From: Aaron Kennedy Date: Thu, 27 Oct 2011 12:34:16 +0000 (+0100) Subject: [V8] Introduce a QML compilation mode X-Git-Tag: qt-v5.0.0-alpha1~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a4d849a0152c76bd9107a1b38a641cf8c0ff226;p=profile%2Fivi%2Fqtjsbackend.git [V8] Introduce a QML compilation mode In QML mode, there is a second global object - known as the QML global object. During property resolution, if a property is not present on the JS global object, it is resolved on the QML global object. This global object behavior is only enabled if a script is being compiled in QML mode. The object to use as the QML global object is passed as a parameter to the Script::Run() method. Any function closures etc. created during the run will retain a reference to this object, so different objects can be passed in different script runs. Change-Id: Ib6b4ed363b7e8089d38a9cdcfb0d3b314dc333ca Reviewed-by: Simon Hausmann --- diff --git a/src/3rdparty/v8/include/v8.h b/src/3rdparty/v8/include/v8.h index 3ef4dd6..193e2fe 100644 --- a/src/3rdparty/v8/include/v8.h +++ b/src/3rdparty/v8/include/v8.h @@ -587,6 +587,11 @@ class ScriptOrigin { */ class V8EXPORT Script { public: + enum CompileFlags { + Default = 0x00, + QmlMode = 0x01 + }; + /** * Compiles the specified script (context-independent). * @@ -605,7 +610,8 @@ class V8EXPORT Script { static Local