From: Aaron Kennedy Date: Fri, 9 Sep 2011 04:16:12 +0000 (+1000) Subject: [V8] Allow a script to be flagged as "native" X-Git-Tag: qt-v5.0.0-alpha1~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2737342fbe24b27b92c5088aa273c2681b3fc2e2;p=profile%2Fivi%2Fqtjsbackend.git [V8] Allow a script to be flagged as "native" Native scripts do not appear in backtraces, or in the source and line number when exceptions are thrown from within them. This is useful to be able to write code in JavaScript instead of C++ and still have it appear sensibly to the user. Change-Id: I93b7b9f0d93ff38204332be6544b1309082b2720 Reviewed-by: Simon Hausmann --- diff --git a/src/3rdparty/v8/include/v8.h b/src/3rdparty/v8/include/v8.h index 6baf2b2..229ddbd 100644 --- a/src/3rdparty/v8/include/v8.h +++ b/src/3rdparty/v8/include/v8.h @@ -588,8 +588,9 @@ class ScriptOrigin { class V8EXPORT Script { public: enum CompileFlags { - Default = 0x00, - QmlMode = 0x01 + Default = 0x00, + QmlMode = 0x01, + NativeMode = 0x02 }; /** diff --git a/src/3rdparty/v8/src/compiler.cc b/src/3rdparty/v8/src/compiler.cc index 4902e72..cabca74 100644 --- a/src/3rdparty/v8/src/compiler.cc +++ b/src/3rdparty/v8/src/compiler.cc @@ -499,7 +499,7 @@ Handle Compiler::Compile(Handle source, // Create a script object describing the script to be compiled. Handle