From 7dc5973bf12919d2d35230844beabe558d4faa00 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Tue, 11 Oct 2011 15:06:25 +1000 Subject: Update V8 Change-Id: I7a9da7dbb2116a441788407d60ed10155cded941 Reviewed-by: Kent Hansen --- ...07-Allow-a-script-to-be-flagged-as-native.patch | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/v8/0007-Allow-a-script-to-be-flagged-as-native.patch (limited to 'src/v8/0007-Allow-a-script-to-be-flagged-as-native.patch') diff --git a/src/v8/0007-Allow-a-script-to-be-flagged-as-native.patch b/src/v8/0007-Allow-a-script-to-be-flagged-as-native.patch new file mode 100644 index 0000000000..396d1f7add --- /dev/null +++ b/src/v8/0007-Allow-a-script-to-be-flagged-as-native.patch @@ -0,0 +1,46 @@ +From a1572a979803dda787be4a7095d5c37e926443a7 Mon Sep 17 00:00:00 2001 +From: Aaron Kennedy +Date: Fri, 9 Sep 2011 14:16:12 +1000 +Subject: [PATCH 07/11] 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. +--- + include/v8.h | 5 +++-- + src/compiler.cc | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/include/v8.h b/include/v8.h +index 6baf2b2..229ddbd 100644 +--- a/include/v8.h ++++ b/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/compiler.cc b/src/compiler.cc +index 596df4a..b760b71 100644 +--- a/src/compiler.cc ++++ b/src/compiler.cc +@@ -501,7 +501,7 @@ Handle Compiler::Compile(Handle source, + + // Create a script object describing the script to be compiled. + Handle