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

Unified Diff: fpdfsdk/src/jsapi/fxjs_v8.cpp

Issue 1366053003: XFA: Pass IFXJS_Runtime via V8 contexts, not V8 isolates (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 3 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
« fpdfsdk/include/javascript/JS_Define.h ('K') | « fpdfsdk/include/jsapi/fxjs_v8.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/jsapi/fxjs_v8.cpp
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index 1c9bb878834dabcf9743e6254cc842c7b9911669..d7868f15862c5a83cd42d86f633b247328e0e7f2 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -269,8 +269,8 @@ void FXJS_InitializeRuntime(v8::Isolate* pIsolate,
v8::Context::Scope context_scope(v8Context);
FXJS_PerIsolateData::SetUp(pIsolate);
- FXJS_PerIsolateData* pData = FXJS_PerIsolateData::Get(pIsolate);
- pData->m_pFXJSRuntime = pFXRuntime;
+ v8::Local<v8::External> ptr = v8::External::New(pIsolate, pFXRuntime);
+ v8Context->SetEmbedderData(1, ptr);
jochen (gone - plz use gerrit) 2015/09/25 11:17:10 we should use kPerContextDataStartIndex + kEmbedde
Tom Sepez 2015/09/25 16:40:11 Ok, I'll make a new constant, but I don't want to
int maxID = CFXJS_ObjDefinition::MaxID(pIsolate);
for (int i = 0; i < maxID; ++i) {
« fpdfsdk/include/javascript/JS_Define.h ('K') | « fpdfsdk/include/jsapi/fxjs_v8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698