summaryrefslogtreecommitdiff
path: root/deps/v8/src/v8natives.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-08-11 23:59:21 -0700
committerRyan Dahl <ry@tinyclouds.org>2011-08-11 23:59:21 -0700
commit89bed195134317a10e6ffffe23a90473790f0a7f (patch)
tree2e3d714711c151458e9ff18bbfa9d04859939ba1 /deps/v8/src/v8natives.js
parentfb7faefbf53f2e27aa2e9cf9dbd88163eeaefb38 (diff)
downloadnode-new-89bed195134317a10e6ffffe23a90473790f0a7f.tar.gz
Upgrade V8 to v3.5.4
Diffstat (limited to 'deps/v8/src/v8natives.js')
-rw-r--r--deps/v8/src/v8natives.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/deps/v8/src/v8natives.js b/deps/v8/src/v8natives.js
index be9b297f81..88525f6b44 100644
--- a/deps/v8/src/v8natives.js
+++ b/deps/v8/src/v8natives.js
@@ -1,4 +1,4 @@
-// Copyright 2006-2008 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -1428,7 +1428,9 @@ function FunctionSourceString(func) {
}
}
- var name = %FunctionGetName(func);
+ var name = %FunctionNameShouldPrintAsAnonymous(func)
+ ? 'anonymous'
+ : %FunctionGetName(func);
return 'function ' + name + source;
}
@@ -1498,9 +1500,9 @@ function FunctionBind(this_arg) { // Length is 1.
// Set the correct length.
var length = (this.length - argc_bound) > 0 ? this.length - argc_bound : 0;
- %FunctionSetLength(result, length);
%FunctionRemovePrototype(result);
%FunctionSetBound(result);
+ %BoundFunctionSetLength(result, length);
return result;
}
@@ -1523,7 +1525,7 @@ function NewFunction(arg1) { // length == 1
// The call to SetNewFunctionAttributes will ensure the prototype
// property of the resulting function is enumerable (ECMA262, 15.3.5.2).
var f = %CompileString(source)();
- %FunctionSetName(f, "anonymous");
+ %FunctionMarkNameShouldPrintAsAnonymous(f);
return %SetNewFunctionAttributes(f);
}