summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-09-17 15:25:23 -0700
committerTom Sepez <tsepez@chromium.org>2015-09-17 15:25:23 -0700
commit39bfe122b4867601051c56562a5ab9cf6be644ad (patch)
tree73ea2387759b2ba2a80ab344da69dc063fc69172 /fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp
parent4babdcf9c7abc9edefb179e5ed23db8e7a5840f7 (diff)
downloadpdfium-39bfe122b4867601051c56562a5ab9cf6be644ad.tar.xz
Merge to XFA: Ensure functions in FXJS_V8 are prefixed by FXJS_.
Manual edits: fpdfsdk/include/javascript/JS_Define.h fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp fpdfsdk/src/javascript/Document.cpp fpdfsdk/src/javascript/JS_Runtime.cpp fpdfsdk/src/jsapi/fxjs_v8.cpp (cherry picked from commit 506df426d5d64d68e9dc27ffebcf56f6c6a1bccf) Original Review URL: https://codereview.chromium.org/1347833002 . (cherry picked from commit 455019ca48f60bd285e043986471f51f17c69a0d) Original Review URL: https://codereview.chromium.org/1349783003 . (cherry picked from commit 1af240cc45480520b447be767686e73a29c48f9e) Original Review URL: https://codereview.chromium.org/1348693003 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1356563003 .
Diffstat (limited to 'fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp')
-rw-r--r--fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp b/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp
index f45570b10f..827e96365a 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp
@@ -22,7 +22,7 @@ class FXJSV8Embeddertest : public EmbedderTest {
void SetUp() override {
EmbedderTest::SetUp();
- m_pAllocator.reset(new JS_ArrayBufferAllocator());
+ m_pAllocator.reset(new FXJS_ArrayBufferAllocator());
v8::Isolate::CreateParams params;
params.array_buffer_allocator = m_pAllocator.get();
@@ -31,14 +31,14 @@ class FXJSV8Embeddertest : public EmbedderTest {
v8::Isolate::Scope isolate_scope(m_pIsolate);
v8::Locker locker(m_pIsolate);
v8::HandleScope handle_scope(m_pIsolate);
- JS_Initialize(0);
- JS_PrepareIsolate(m_pIsolate);
- JS_InitializeRuntime(m_pIsolate, nullptr, nullptr, m_pPersistentContext);
+ FXJS_Initialize(0);
+ FXJS_PrepareIsolate(m_pIsolate);
+ FXJS_InitializeRuntime(m_pIsolate, nullptr, nullptr, m_pPersistentContext);
}
void TearDown() override {
- JS_ReleaseRuntime(m_pIsolate, m_pPersistentContext);
- JS_Release();
+ FXJS_ReleaseRuntime(m_pIsolate, m_pPersistentContext);
+ FXJS_Release();
EmbedderTest::TearDown();
}
@@ -62,10 +62,10 @@ TEST_F(FXJSV8Embeddertest, Getters) {
FXJSErr error;
CFX_WideString wsInfo;
CFX_WideString wsScript(kScript);
- int sts = JS_Execute(isolate(), nullptr, kScript, wcslen(kScript), &error);
+ int sts = FXJS_Execute(isolate(), nullptr, kScript, wcslen(kScript), &error);
EXPECT_EQ(0, sts);
- v8::Local<v8::Object> This = JS_GetThisObj(isolate());
- v8::Local<v8::Value> fred = JS_GetObjectElement(isolate(), This, L"fred");
+ v8::Local<v8::Object> This = FXJS_GetThisObj(isolate());
+ v8::Local<v8::Value> fred = FXJS_GetObjectElement(isolate(), This, L"fred");
EXPECT_TRUE(fred->IsNumber());
}