diff options
author | Trevor Norris <trev.norris@gmail.com> | 2013-05-22 12:56:12 -0700 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2013-05-22 13:13:11 -0700 |
commit | 506fc4de1e820d97b637f6e01dda2ab97667efa7 (patch) | |
tree | e2f2fec2085f6c1a603b79be4e63e765292cca52 /deps/v8/src/v8natives.js | |
parent | 52adc0d96309f9e04cbb220d63206e32b8309081 (diff) | |
download | node-506fc4de1e820d97b637f6e01dda2ab97667efa7.tar.gz |
v8: upgrade to v3.19.3
Diffstat (limited to 'deps/v8/src/v8natives.js')
-rw-r--r-- | deps/v8/src/v8natives.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/deps/v8/src/v8natives.js b/deps/v8/src/v8natives.js index 9266af6f0..b2ea749c7 100644 --- a/deps/v8/src/v8natives.js +++ b/deps/v8/src/v8natives.js @@ -1356,6 +1356,7 @@ function ObjectConstructor(x) { function SetUpObject() { %CheckIsBootstrapping(); + %SetNativeFlag($Object); %SetCode($Object, ObjectConstructor); %FunctionSetName(ObjectPoisonProto, "__proto__"); %FunctionRemovePrototype(ObjectPoisonProto); @@ -1766,7 +1767,9 @@ function NewFunction(arg1) { // length == 1 // If the formal parameters string include ) - an illegal // character - it may make the combined function expression // compile. We avoid this problem by checking for this early on. - if (p.indexOf(')') != -1) throw MakeSyntaxError('paren_in_arg_string',[]); + if (%_CallFunction(p, ')', StringIndexOf) != -1) { + throw MakeSyntaxError('paren_in_arg_string',[]); + } // If the formal parameters include an unbalanced block comment, the // function must be rejected. Since JavaScript does not allow nested // comments we can include a trailing block comment to catch this. @@ -1775,13 +1778,11 @@ function NewFunction(arg1) { // length == 1 var body = (n > 0) ? ToString(%_Arguments(n - 1)) : ''; var source = '(function(' + p + ') {\n' + body + '\n})'; - // The call to SetNewFunctionAttributes will ensure the prototype - // property of the resulting function is enumerable (ECMA262, 15.3.5.2). var global_receiver = %GlobalReceiver(global); var f = %_CallFunction(global_receiver, %CompileString(source, true)); %FunctionMarkNameShouldPrintAsAnonymous(f); - return %SetNewFunctionAttributes(f); + return f; } |