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

Unified Diff: fpdfsdk/src/jsapi/fxjs_v8.cpp

Issue 1318543012: CJS_Context::compile unused (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Remove pointless asserts. Created 5 years, 4 months 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_Context.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/jsapi/fxjs_v8.cpp
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index b71cee6bcca5d80b7a7c577969c17c1eab77d09a..f2f2e55898f018f56186ad2d086fa4022948ca31 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -368,31 +368,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,
« no previous file with comments | « fpdfsdk/src/javascript/JS_Context.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698