Commit c18e04b2 authored by Philip Lorenz's avatar Philip Lorenz Committed by The Qt Project
Browse files

Only free context if the owning QV8ContextResource gets destroyed

Since fdeee38b

 QQmlXMLHttpRequest stores
the calling context for later use. This leads to issues after the first
request completes and the wrapping QV8ContextResource gets freed by
garbage collection and therefore removes the associated QQmlDataContext
which may still be required for later calls (e.g. if the calling context
is part of a stateless library).

This patch introduces an ownership flag for QV8ContextResource which
indicates if the associated context should be cleared when the object is
destroyed.

Task-number: QTBUG-28351

Change-Id: I552ebb5c55b889eb33f3884283c8fdf037ac33be
Reviewed-by: default avatarAlan Alpert <aalpert@rim.com>
parent 22924ac4
Showing with 59 additions and 8 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment