OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |