diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-02-07 21:07:24 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-07 21:07:24 +0000 |
commit | 9ad9a5fc81a36ab406ff49408dd0814d350bbc7e (patch) | |
tree | ec46a8cbec08c17d5932bd330c4fd4b5baa2c180 /fxjs/cjs_global.cpp | |
parent | 161f992a81e400eeebba49387f174d836750d624 (diff) | |
download | pdfium-9ad9a5fc81a36ab406ff49408dd0814d350bbc7e.tar.xz |
Split creation of ordinary object and bound objects in FXJS.chromium/3343
One can be performed by the CJS_V8 layer, the other requires the
full FXJS mechanism. Avoids using -1 as a special case.
Change-Id: I4a14ccb6a7fea393f84b70a07ada03b1a83c7d36
Reviewed-on: https://pdfium-review.googlesource.com/25830
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjs_global.cpp')
-rw-r--r-- | fxjs/cjs_global.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fxjs/cjs_global.cpp b/fxjs/cjs_global.cpp index fbc6bf94e8..729190fe13 100644 --- a/fxjs/cjs_global.cpp +++ b/fxjs/cjs_global.cpp @@ -333,7 +333,7 @@ void CJS_Global::UpdateGlobalPersistentVariables() { pRuntime->NewString(pData->data.sData.UTF8Decode().AsStringView())); break; case JS_GlobalDataType::OBJECT: { - v8::Local<v8::Object> pObj = pRuntime->NewFxDynamicObj(-1); + v8::Local<v8::Object> pObj = pRuntime->NewObject(); if (!pObj.IsEmpty()) { PutObjectProperty(pObj, &pData->data); SetGlobalVariables(pData->data.sKey, JS_GlobalDataType::OBJECT, 0, @@ -461,7 +461,7 @@ void CJS_Global::PutObjectProperty(v8::Local<v8::Object> pObj, pRuntime->NewString(pObjData->sData.UTF8Decode().AsStringView())); break; case JS_GlobalDataType::OBJECT: { - v8::Local<v8::Object> pNewObj = pRuntime->NewFxDynamicObj(-1); + v8::Local<v8::Object> pNewObj = pRuntime->NewObject(); if (!pNewObj.IsEmpty()) { PutObjectProperty(pNewObj, pObjData); pRuntime->PutObjectProperty(pObj, pObjData->sKey.UTF8Decode(), |