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

Unified Diff: src/debug/mirrors.js

Issue 1293493004: Unify symbols sharing across native scripts and runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 4 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/contexts.h ('k') | src/heap/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/mirrors.js
diff --git a/src/debug/mirrors.js b/src/debug/mirrors.js
index f47a2d058eaca4cdaacfdc1c7c8aa2a96a0b2aac..1b45b93d8d77208e16375d3c94dafa1031dd3cfd 100644
--- a/src/debug/mirrors.js
+++ b/src/debug/mirrors.js
@@ -13,6 +13,8 @@ var GlobalArray = global.Array;
var IsNaN = global.isNaN;
var JSONStringify = global.JSON.stringify;
var MathMin = global.Math.min;
+var promiseStatusSymbol = utils.GetPrivateSymbol("promise_status_symbol");
+var promiseValueSymbol = utils.GetPrivateSymbol("promise_value_symbol");
var ToBoolean;
var ToString;
@@ -109,7 +111,7 @@ function ClearMirrorCache(value) {
function ObjectIsPromise(value) {
try {
return IS_SPEC_OBJECT(value) &&
- !IS_UNDEFINED(%DebugGetProperty(value, builtins.$promiseStatus));
+ !IS_UNDEFINED(%DebugGetProperty(value, promiseStatusSymbol));
} catch (e) {
return false;
}
@@ -1326,7 +1328,7 @@ inherits(PromiseMirror, ObjectMirror);
function PromiseGetStatus_(value) {
- var status = %DebugGetProperty(value, builtins.$promiseStatus);
+ var status = %DebugGetProperty(value, promiseStatusSymbol);
if (status == 0) return "pending";
if (status == 1) return "resolved";
return "rejected";
@@ -1334,7 +1336,7 @@ function PromiseGetStatus_(value) {
function PromiseGetValue_(value) {
- return %DebugGetProperty(value, builtins.$promiseValue);
+ return %DebugGetProperty(value, promiseValueSymbol);
}
« no previous file with comments | « src/contexts.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698