summaryrefslogtreecommitdiff
path: root/src/3rdparty/v8/src/compiler.cc
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-09-09 14:16:12 +1000
committerSimon Hausmann <simon.hausmann@nokia.com>2012-01-05 12:18:11 +0100
commit7e77d8742ada5ee7fbdd8dfb7c3dc7ee9ebe3891 (patch)
treeb88f2cd425a8135070610d9e6ebc7db5e83363f1 /src/3rdparty/v8/src/compiler.cc
parentdd34832c519d86f1f7d157d872a87f8ed56de6c8 (diff)
downloadqtjsbackend-7e77d8742ada5ee7fbdd8dfb7c3dc7ee9ebe3891.tar.gz
[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: Ib022e74b3b912260d990faa2b2b81a32fa1d8a07
Diffstat (limited to 'src/3rdparty/v8/src/compiler.cc')
-rw-r--r--src/3rdparty/v8/src/compiler.cc2
1 files changed, 1 insertions, 1 deletions
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<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
// Create a script object describing the script to be compiled.
Handle<Script> script = FACTORY->NewScript(source);
- if (natives == NATIVES_CODE) {
+ if (natives == NATIVES_CODE || compile_flags & v8::Script::NativeMode) {
script->set_type(Smi::FromInt(Script::TYPE_NATIVE));
}
if (!script_name.is_null()) {