Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: src/apinatives.js

Issue 12385082: Make sure builtin functions don't rely on __proto__. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/apinatives.js
diff --git a/src/apinatives.js b/src/apinatives.js
index 79b41dd88c28f5284c9df9cf463a05b41aa6e4f7..ad1d869415c18ef03e0d389851583eb17e4764e5 100644
--- a/src/apinatives.js
+++ b/src/apinatives.js
@@ -90,7 +90,7 @@ function InstantiateFunction(data, name) {
// internal ToBoolean doesn't handle that!
if (!(typeof parent === 'undefined')) {
var parent_fun = Instantiate(parent);
- fun.prototype.__proto__ = parent_fun.prototype;
+ %SetPrototype(fun.prototype, parent_fun.prototype);
}
ConfigureTemplateInstance(fun, data);
} catch (e) {
« no previous file with comments | « no previous file | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698