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

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

Issue 1516843002: [proxy] fixing harmony/proxy.js tests and improving error messages + some drive-by fixes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: WIP fix protoype walks with access checks Created 5 years 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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) { 5 (function(global, utils) {
6 6
7 %CheckIsBootstrapping(); 7 %CheckIsBootstrapping();
8 8
9 // ---------------------------------------------------------------------------- 9 // ----------------------------------------------------------------------------
10 // Imports 10 // Imports
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 562
563 // Harmony proxies. 563 // Harmony proxies.
564 function DefineProxyProperty(obj, p, attributes, should_throw) { 564 function DefineProxyProperty(obj, p, attributes, should_throw) {
565 // TODO(rossberg): adjust once there is a story for symbols vs proxies. 565 // TODO(rossberg): adjust once there is a story for symbols vs proxies.
566 if (IS_SYMBOL(p)) return false; 566 if (IS_SYMBOL(p)) return false;
567 567
568 var handler = %GetHandler(obj); 568 var handler = %GetHandler(obj);
569 var result = CallTrap2(handler, "defineProperty", UNDEFINED, p, attributes); 569 var result = CallTrap2(handler, "defineProperty", UNDEFINED, p, attributes);
570 if (!result) { 570 if (!result) {
571 if (should_throw) { 571 if (should_throw) {
572 throw MakeTypeError(kProxyHandlerReturned, 572 throw MakeTypeError(kProxyTrapReturned,
573 handler, "false", "defineProperty"); 573 handler, "false", "defineProperty");
574 } else { 574 } else {
575 return false; 575 return false;
576 } 576 }
577 } 577 }
578 return true; 578 return true;
579 } 579 }
580 580
581 581
582 // ES6 9.1.6 [[DefineOwnProperty]](P, Desc) 582 // ES6 9.1.6 [[DefineOwnProperty]](P, Desc)
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 to.ObjectToString = ObjectToString; 1518 to.ObjectToString = ObjectToString;
1519 }); 1519 });
1520 1520
1521 %InstallToContext([ 1521 %InstallToContext([
1522 "global_eval_fun", GlobalEval, 1522 "global_eval_fun", GlobalEval,
1523 "object_value_of", ObjectValueOf, 1523 "object_value_of", ObjectValueOf,
1524 "object_to_string", ObjectToString, 1524 "object_to_string", ObjectToString,
1525 ]); 1525 ]);
1526 1526
1527 }) 1527 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698