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

Unified Diff: fpdfsdk/src/javascript/JS_Runtime.cpp

Issue 1424933013: Keep "static" objects per-context rather than per isolate. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nullptr Created 5 years, 1 month 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 | « fpdfsdk/src/javascript/JS_Runtime.h ('k') | fpdfsdk/src/jsapi/fxjs_v8.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/JS_Runtime.cpp
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index 34a18dc385b12018b20b1fcbe548204b731ee239..74d9a44a1c5a2b5672268cc8d57afd27b8709dc9 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime.cpp
@@ -64,7 +64,7 @@ CJS_Runtime::CJS_Runtime(CPDFDoc_Environment* pApp)
DefineJSObjects();
CJS_Context* pContext = (CJS_Context*)NewContext();
- FXJS_InitializeRuntime(GetIsolate(), this, m_context);
+ FXJS_InitializeRuntime(GetIsolate(), this, &m_context, &m_StaticObjects);
ReleaseContext(pContext);
}
@@ -76,7 +76,7 @@ CJS_Runtime::~CJS_Runtime() {
delete m_ContextArray.GetAt(i);
m_ContextArray.RemoveAll();
- FXJS_ReleaseRuntime(GetIsolate(), m_context);
+ FXJS_ReleaseRuntime(GetIsolate(), &m_context, &m_StaticObjects);
m_pApp = NULL;
m_pDocument = NULL;
« no previous file with comments | « fpdfsdk/src/javascript/JS_Runtime.h ('k') | fpdfsdk/src/jsapi/fxjs_v8.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698