summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/jsapi
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-09-01 09:51:10 -0700
committerTom Sepez <tsepez@chromium.org>2015-09-01 09:51:10 -0700
commit9ed941a3709dc27ab8c7b27941197c6238f201a3 (patch)
tree929cf2ab538aca70a0544bfd633796c345c64ef1 /fpdfsdk/src/jsapi
parentaecd9d0c5cfc569269bfe6cc228efaab76a7bb1b (diff)
downloadpdfium-9ed941a3709dc27ab8c7b27941197c6238f201a3.tar.xz
Merge to XFA: CJS_Context::compile unused
Manual merge in fpdfsdk/src/javascript/JS_Context.cpp (cherry picked from commit 6e945a1ebbacde3ed2a4fc83ccb7215ccbc46931) Original Review URL: https://codereview.chromium.org/1318543012 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1318343004 .
Diffstat (limited to 'fpdfsdk/src/jsapi')
-rw-r--r--fpdfsdk/src/jsapi/fxjs_v8.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index d0e8e6e593..de957ed456 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -373,31 +373,8 @@ void JS_ReleaseRuntime(IJS_Runtime* pJSRuntime,
void JS_Initial(unsigned int embedderDataSlot) {
g_embedderDataSlot = embedderDataSlot;
}
-void JS_Release() {}
-int JS_Parse(IJS_Runtime* pJSRuntime,
- IFXJS_Context* pJSContext,
- const wchar_t* script,
- long length,
- FXJSErr* perror) {
- v8::Isolate* isolate = (v8::Isolate*)pJSRuntime;
- v8::Isolate::Scope isolate_scope(isolate);
- v8::TryCatch try_catch(isolate);
- CFX_WideString wsScript(script);
- CFX_ByteString bsScript = wsScript.UTF8Encode();
-
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
- v8::Local<v8::Script> compiled_script;
- if (!v8::Script::Compile(context,
- v8::String::NewFromUtf8(isolate, bsScript.c_str(),
- v8::NewStringType::kNormal,
- bsScript.GetLength())
- .ToLocalChecked())
- .ToLocal(&compiled_script)) {
- v8::String::Utf8Value error(try_catch.Exception());
- return -1;
- }
- return 0;
+void JS_Release() {
}
int JS_Execute(IJS_Runtime* pJSRuntime,