diff options
author | jochen <jochen@chromium.org> | 2016-07-06 11:02:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-06 11:02:27 -0700 |
commit | 7e6a8484b05819268b4e7f0350cebfb704c6d18c (patch) | |
tree | d62fdccd645e936f4f25a69dc51365dd1fa0ab1e | |
parent | a27d49a3e9eafd7fd911a0a6039ce80284ccb463 (diff) | |
download | pdfium-7e6a8484b05819268b4e7f0350cebfb704c6d18c.tar.xz |
Roll DEPS for v8 to 820a23aa.
Also roll DEPS for ICU to ffa4b670 and add a needed GYP variable.
BUG=
R=thestig@chromium.org
Review-Url: https://codereview.chromium.org/2127553004
-rw-r--r-- | DEPS | 4 | ||||
-rw-r--r-- | build_gyp/standalone.gypi | 1 | ||||
-rw-r--r-- | fpdfsdk/jsapi/fxjs_v8.cpp | 17 | ||||
-rw-r--r-- | fxjse/context.cpp | 4 | ||||
-rw-r--r-- | fxjse/runtime.cpp | 8 |
5 files changed, 28 insertions, 6 deletions
@@ -13,12 +13,12 @@ vars = { 'gen_library_loader_revision': '916d4acd8b2cde67a390737dfba90b3c37de23a1', 'gmock_revision': '29763965ab52f24565299976b936d1265cb6a271', 'gtest_revision': '8245545b6dc9c4703e6496d1efd19e975ad2b038', - 'icu_revision': 'c291cde264469b20ca969ce8832088acb21e0c48', + 'icu_revision': 'ffa4b6704cf5cc9fec9485731f24a05b2ba94bca', 'pdfium_tests_revision': '6c769320872e6ca82da4adaec1a497237f71b543', 'skia_revision': '7942f22c607caf826a6a609b89338a569d0a30e7', 'tools_memory_revision': '427f10475e1a8d72424c29d00bf689122b738e5d', 'trace_event_revision': '54b8455be9505c2cb0cf5c26bb86739c236471aa', - 'v8_revision': 'cec0ed0f77e91bfd49bbd298ab58f77375eecead', + 'v8_revision': '820a23aade5e74a92d794e05a0c2b3597f0da4b5', } deps = { diff --git a/build_gyp/standalone.gypi b/build_gyp/standalone.gypi index 1affc3c82b..cab5b1ae73 100644 --- a/build_gyp/standalone.gypi +++ b/build_gyp/standalone.gypi @@ -52,6 +52,7 @@ 'werror%': '-Werror', 'v8_optimized_debug%': 0, 'v8_use_external_startup_data%': 0, + 'icu_use_data_file_flag%': 1, 'icu_gyp_path': '../third_party/icu/icu.gyp', 'libjpeg_gyp_path': '../third_party/third_party.gyp', 'conditions': [ diff --git a/fpdfsdk/jsapi/fxjs_v8.cpp b/fpdfsdk/jsapi/fxjs_v8.cpp index 3297b4bd12..ddeb28f237 100644 --- a/fpdfsdk/jsapi/fxjs_v8.cpp +++ b/fpdfsdk/jsapi/fxjs_v8.cpp @@ -65,6 +65,12 @@ class CFXJS_ObjDefinition { v8::Local<v8::FunctionTemplate> fun = v8::FunctionTemplate::New(isolate); fun->InstanceTemplate()->SetInternalFieldCount(2); + if (eObjType == FXJSOBJTYPE_GLOBAL) { + fun->InstanceTemplate()->Set( + v8::Symbol::GetToStringTag(isolate), + v8::String::NewFromUtf8(isolate, "global", v8::NewStringType::kNormal) + .ToLocalChecked()); + } m_FunctionTemplate.Reset(isolate, fun); v8::Local<v8::Signature> sig = v8::Signature::New(isolate, fun); @@ -108,9 +114,14 @@ static v8::Local<v8::ObjectTemplate> GetGlobalObjectTemplate( return pObjDef->GetInstanceTemplate(); } if (!g_DefaultGlobalObjectTemplate) { - g_DefaultGlobalObjectTemplate = new v8::Global<v8::ObjectTemplate>; - g_DefaultGlobalObjectTemplate->Reset(pIsolate, - v8::ObjectTemplate::New(pIsolate)); + v8::Local<v8::ObjectTemplate> hGlobalTemplate = + v8::ObjectTemplate::New(pIsolate); + hGlobalTemplate->Set( + v8::Symbol::GetToStringTag(pIsolate), + v8::String::NewFromUtf8(pIsolate, "global", v8::NewStringType::kNormal) + .ToLocalChecked()); + g_DefaultGlobalObjectTemplate = + new v8::Global<v8::ObjectTemplate>(pIsolate, hGlobalTemplate); } return g_DefaultGlobalObjectTemplate->Get(pIsolate); } diff --git a/fxjse/context.cpp b/fxjse/context.cpp index 3ecc3e2321..9c43830997 100644 --- a/fxjse/context.cpp +++ b/fxjse/context.cpp @@ -141,6 +141,10 @@ CFXJSE_Context* CFXJSE_Context::Create( hObjectTemplate = v8::ObjectTemplate::New(pIsolate); hObjectTemplate->SetInternalFieldCount(1); } + hObjectTemplate->Set( + v8::Symbol::GetToStringTag(pIsolate), + v8::String::NewFromUtf8(pIsolate, "global", v8::NewStringType::kNormal) + .ToLocalChecked()); v8::Local<v8::Context> hNewContext = v8::Context::New(pIsolate, NULL, hObjectTemplate); v8::Local<v8::Context> hRootContext = v8::Local<v8::Context>::New( diff --git a/fxjse/runtime.cpp b/fxjse/runtime.cpp index 29814bdc7e..b5f2f33a75 100644 --- a/fxjse/runtime.cpp +++ b/fxjse/runtime.cpp @@ -79,8 +79,14 @@ CFXJSE_RuntimeData* CFXJSE_RuntimeData::Create(v8::Isolate* pIsolate) { CFXJSE_ScopeUtil_IsolateHandle scope(pIsolate); v8::Local<v8::FunctionTemplate> hFuncTemplate = v8::FunctionTemplate::New(pIsolate); + v8::Local<v8::ObjectTemplate> hGlobalTemplate = + hFuncTemplate->InstanceTemplate(); + hGlobalTemplate->Set( + v8::Symbol::GetToStringTag(pIsolate), + v8::String::NewFromUtf8(pIsolate, "global", v8::NewStringType::kNormal) + .ToLocalChecked()); v8::Local<v8::Context> hContext = - v8::Context::New(pIsolate, 0, hFuncTemplate->InstanceTemplate()); + v8::Context::New(pIsolate, 0, hGlobalTemplate); hContext->SetSecurityToken(v8::External::New(pIsolate, pIsolate)); pRuntimeData->m_hRootContextGlobalTemplate.Reset(pIsolate, hFuncTemplate); pRuntimeData->m_hRootContext.Reset(pIsolate, hContext); |