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

Unified Diff: src/api.cc

Issue 2806303002: [debug,api] Do not use embedder field for debug context id. (Closed)
Patch Set: restore enum Created 3 years, 8 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 | « include/v8.h ('k') | src/contexts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index a0990efd76340ac7bdca7d9ef79fce23a6ba3df0..bb9b01f77646faff749150c43570561302c7083f 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -9045,6 +9045,15 @@ MaybeLocal<Array> Debug::GetInternalProperties(Isolate* v8_isolate,
return debug::GetInternalProperties(v8_isolate, value);
}
+void debug::SetContextId(Local<Context> context, int id) {
+ Utils::OpenHandle(*context)->set_debug_context_id(i::Smi::FromInt(id));
+}
+
+int debug::GetContextId(Local<Context> context) {
+ i::Object* value = Utils::OpenHandle(*context)->debug_context_id();
+ return (value->IsSmi()) ? i::Smi::cast(value)->value() : 0;
+}
+
Local<Context> debug::GetDebugContext(Isolate* isolate) {
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
ENTER_V8(i_isolate);
« no previous file with comments | « include/v8.h ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698