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

Unified Diff: src/v8natives.js

Issue 181453002: Reset trunk to 3.24.35.4 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/v8.cc ('k') | src/version.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 256343a89e9a8ec302242b40d37764cb62696c87..df663c025e927a79222e031ab8eee14d004f67a8 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -1384,19 +1384,15 @@ function ObjectIs(obj1, obj2) {
}
-// ECMA-262, Edition 6, section B.2.2.1.1
+// Harmony __proto__ getter.
function ObjectGetProto() {
- return %GetPrototype(ToObject(this));
+ return %GetPrototype(this);
}
-// ECMA-262, Edition 6, section B.2.2.1.2
-function ObjectSetProto(proto) {
- CHECK_OBJECT_COERCIBLE(this, "Object.prototype.__proto__");
-
- if (IS_SPEC_OBJECT(proto) || IS_NULL(proto) && IS_SPEC_OBJECT(this)) {
- %SetPrototype(this, proto);
- }
+// Harmony __proto__ setter.
+function ObjectSetProto(obj) {
+ return %SetPrototype(this, obj);
}
@@ -1893,30 +1889,10 @@ SetUpFunction();
// Eventually, we should move to a real event queue that allows to maintain
// relative ordering of different kinds of tasks.
-function GetMicrotaskQueue() {
- var microtaskState = %GetMicrotaskState();
- if (IS_UNDEFINED(microtaskState.queue)) {
- microtaskState.queue = new InternalArray;
- }
- return microtaskState.queue;
-}
+RunMicrotasks.runners = new InternalArray;
function RunMicrotasks() {
while (%SetMicrotaskPending(false)) {
- var microtaskState = %GetMicrotaskState();
- if (IS_UNDEFINED(microtaskState.queue))
- return;
-
- var microtasks = microtaskState.queue;
- microtaskState.queue = new InternalArray;
-
- for (var i = 0; i < microtasks.length; i++) {
- microtasks[i]();
- }
+ for (var i in RunMicrotasks.runners) RunMicrotasks.runners[i]();
}
}
-
-function EnqueueExternalMicrotask(fn) {
- GetMicrotaskQueue().push(fn);
- %SetMicrotaskPending(true);
-}
« no previous file with comments | « src/v8.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698