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

Side by Side Diff: src/js/prologue.js

Issue 2297193005: Don't ignore passed attributes in InstallGetterSetter (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function(global, utils, extrasUtils) { 5 (function(global, utils, extrasUtils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 114
115 // Helper function to install a getter/setter accessor property. 115 // Helper function to install a getter/setter accessor property.
116 function InstallGetterSetter(object, name, getter, setter, attributes) { 116 function InstallGetterSetter(object, name, getter, setter, attributes) {
117 %CheckIsBootstrapping(); 117 %CheckIsBootstrapping();
118 if (IS_UNDEFINED(attributes)) attributes = DONT_ENUM; 118 if (IS_UNDEFINED(attributes)) attributes = DONT_ENUM;
119 SetFunctionName(getter, name, "get"); 119 SetFunctionName(getter, name, "get");
120 SetFunctionName(setter, name, "set"); 120 SetFunctionName(setter, name, "set");
121 %FunctionRemovePrototype(getter); 121 %FunctionRemovePrototype(getter);
122 %FunctionRemovePrototype(setter); 122 %FunctionRemovePrototype(setter);
123 %DefineAccessorPropertyUnchecked(object, name, getter, setter, DONT_ENUM); 123 %DefineAccessorPropertyUnchecked(object, name, getter, setter, attributes);
124 %SetNativeFlag(getter); 124 %SetNativeFlag(getter);
125 %SetNativeFlag(setter); 125 %SetNativeFlag(setter);
126 } 126 }
127 127
128 128
129 function OverrideFunction(object, name, f, afterInitialBootstrap) { 129 function OverrideFunction(object, name, f, afterInitialBootstrap) {
130 %CheckIsBootstrapping(); 130 %CheckIsBootstrapping();
131 %object_define_property(object, name, { value: f, 131 %object_define_property(object, name, { value: f,
132 writeable: true, 132 writeable: true,
133 configurable: true, 133 configurable: true,
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 353
354 extrasUtils.uncurryThis = function uncurryThis(func) { 354 extrasUtils.uncurryThis = function uncurryThis(func) {
355 return function(thisArg, ...args) { 355 return function(thisArg, ...args) {
356 return %reflect_apply(func, thisArg, args); 356 return %reflect_apply(func, thisArg, args);
357 }; 357 };
358 }; 358 };
359 359
360 %ToFastProperties(extrasUtils); 360 %ToFastProperties(extrasUtils);
361 361
362 }) 362 })
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698