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

Unified Diff: src/factory.cc

Issue 450303003: Tag all prototypes as proto, except those set using __proto__ (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove is_shared from Map Created 6 years, 4 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 | « src/bootstrapper.cc ('k') | src/generator.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index a52b95719db05276362f7325ec32be751b37d87a..042cf84c8471a79c4b8b8b069c85e853a59408e8 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1289,8 +1289,8 @@ Handle<JSFunction> Factory::NewFunction(Handle<String> name,
prototype = NewFunctionPrototype(function);
}
- initial_map->set_prototype(*prototype);
- JSFunction::SetInitialMap(function, initial_map);
+ JSFunction::SetInitialMap(function, initial_map,
+ Handle<JSReceiver>::cast(prototype));
return function;
}
@@ -1321,6 +1321,7 @@ Handle<JSObject> Factory::NewFunctionPrototype(Handle<JSFunction> function) {
new_map = handle(object_function->initial_map());
}
+ DCHECK(!new_map->is_prototype_map());
Handle<JSObject> prototype = NewJSObjectFromMap(new_map);
if (!function->shared()->is_generator()) {
« no previous file with comments | « src/bootstrapper.cc ('k') | src/generator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698