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

Unified Diff: src/apinatives.js

Issue 274463003: Directly create API functions with readonly prototypes rather than converting. Remove FunctionSetRe… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove test Created 6 years, 7 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 | « include/v8.h ('k') | src/bootstrapper.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 0579caf544b9065f061aabb2d01e4c9b4dbb8b77..0b45b3f1a0a50028e880edf2e462ea540bd3d309 100644
--- a/src/apinatives.js
+++ b/src/apinatives.js
@@ -49,9 +49,8 @@ function InstantiateFunction(data, name) {
if (!isFunctionCached) {
try {
var flags = %GetTemplateField(data, kApiFlagOffset);
- var has_proto = !(flags & (1 << kRemovePrototypeBit));
var prototype;
- if (has_proto) {
+ if (!(flags & (1 << kRemovePrototypeBit))) {
var template = %GetTemplateField(data, kApiPrototypeTemplateOffset);
prototype = typeof template === 'undefined'
? {} : Instantiate(template);
@@ -68,9 +67,6 @@ function InstantiateFunction(data, name) {
if (name) %FunctionSetName(fun, name);
var doNotCache = flags & (1 << kDoNotCacheBit);
if (!doNotCache) cache[serialNumber] = fun;
- if (has_proto && flags & (1 << kReadOnlyPrototypeBit)) {
- %FunctionSetReadOnlyPrototype(fun);
- }
ConfigureTemplateInstance(fun, data);
if (doNotCache) return fun;
} catch (e) {
« no previous file with comments | « include/v8.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698