From 716e69f69e19ae5ade3c5f35b95e770be204635d Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 9 Sep 2011 14:16:12 +1000 Subject: [PATCH] [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: I324ad60d8712c0afba7f0e4f26ce5ab931ae91dd Reviewed-by: Kent Hansen --- src/3rdparty/v8/include/v8.h | 5 +++-- src/3rdparty/v8/src/compiler.cc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/3rdparty/v8/include/v8.h b/src/3rdparty/v8/include/v8.h index 0f23f21..78b6beb 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 ffd124e..6435068 100644 --- a/src/3rdparty/v8/src/compiler.cc +++ b/src/3rdparty/v8/src/compiler.cc @@ -508,7 +508,7 @@ Handle Compiler::Compile(Handle source, // Create a script object describing the script to be compiled. Handle