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

Side by Side Diff: src/v8natives.js

Issue 174113003: Fix issue with setting __proto__ on a value (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/proto-accessor.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 // ECMA-262, Edition 6, section B.2.2.1.1 1387 // ECMA-262, Edition 6, section B.2.2.1.1
1388 function ObjectGetProto() { 1388 function ObjectGetProto() {
1389 return %GetPrototype(ToObject(this)); 1389 return %GetPrototype(ToObject(this));
1390 } 1390 }
1391 1391
1392 1392
1393 // ECMA-262, Edition 6, section B.2.2.1.2 1393 // ECMA-262, Edition 6, section B.2.2.1.2
1394 function ObjectSetProto(proto) { 1394 function ObjectSetProto(proto) {
1395 CHECK_OBJECT_COERCIBLE(this, "Object.prototype.__proto__"); 1395 CHECK_OBJECT_COERCIBLE(this, "Object.prototype.__proto__");
1396 1396
1397 if (IS_SPEC_OBJECT(proto) || IS_NULL(proto) && IS_SPEC_OBJECT(this)) { 1397 if ((IS_SPEC_OBJECT(proto) || IS_NULL(proto)) && IS_SPEC_OBJECT(this)) {
1398 %SetPrototype(this, proto); 1398 %SetPrototype(this, proto);
1399 } 1399 }
1400 } 1400 }
1401 1401
1402 1402
1403 function ObjectConstructor(x) { 1403 function ObjectConstructor(x) {
1404 if (%_IsConstructCall()) { 1404 if (%_IsConstructCall()) {
1405 if (x == null) return this; 1405 if (x == null) return this;
1406 return ToObject(x); 1406 return ToObject(x);
1407 } else { 1407 } else {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 for (var i = 0; i < microtasks.length; i++) { 1913 for (var i = 0; i < microtasks.length; i++) {
1914 microtasks[i](); 1914 microtasks[i]();
1915 } 1915 }
1916 } 1916 }
1917 } 1917 }
1918 1918
1919 function EnqueueExternalMicrotask(fn) { 1919 function EnqueueExternalMicrotask(fn) {
1920 GetMicrotaskQueue().push(fn); 1920 GetMicrotaskQueue().push(fn);
1921 %SetMicrotaskPending(true); 1921 %SetMicrotaskPending(true);
1922 } 1922 }
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/proto-accessor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698