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

Unified Diff: src/api.cc

Issue 1140333003: Introduce extras export object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: no condition Created 5 years, 7 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
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 4ad40423b13ccb21ecfb03540682c6c5cd94d838..0cd34a116cc81758876f00d71bdf2ad9d2065cb4 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -5493,6 +5493,16 @@ void Context::DetachGlobal() {
}
+MaybeLocal<v8::Object> Context::GetExtrasExportsObject() {
+ i::Handle<i::Context> context = Utils::OpenHandle(this);
+ i::Isolate* isolate = context->GetIsolate();
+ i::Object* extras_exports = context->extras_exports_object();
+ if (!extras_exports->IsJSObject()) return MaybeLocal<v8::Object>();
+ i::Handle<i::JSObject> exports(i::JSObject::cast(extras_exports), isolate);
+ return Utils::ToLocal(exports);
+}
+
+
void Context::AllowCodeGenerationFromStrings(bool allow) {
i::Handle<i::Context> context = Utils::OpenHandle(this);
i::Isolate* isolate = context->GetIsolate();

Powered by Google App Engine
This is Rietveld 408576698