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

Unified Diff: src/api.cc

Issue 13839008: Merged r14171, r14175 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 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/json-stringifier.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 65663ba5c66c6dfcb1e210d31949fa59ed642d71..178eeabe02a3138dd7285fdaa3f3737ba62b9e2a 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -5813,6 +5813,15 @@ CpuProfiler* Isolate::GetCpuProfiler() {
}
+v8::Local<v8::Context> Isolate::GetCurrentContext() {
+ i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(this);
+ i::Handle<i::Object> current = internal_isolate->native_context();
+ if (current.is_null()) return Local<Context>();
+ i::Handle<i::Context> context = i::Handle<i::Context>::cast(current);
+ return Utils::ToLocal(context);
+}
+
+
void V8::SetGlobalGCPrologueCallback(GCCallback callback) {
i::Isolate* isolate = i::Isolate::Current();
if (IsDeadCheck(isolate, "v8::V8::SetGlobalGCPrologueCallback()")) return;
« no previous file with comments | « include/v8.h ('k') | src/json-stringifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698