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

Unified Diff: fpdfsdk/jsapi/fxjs_v8_embeddertest.cpp

Issue 2035743002: Remove unused context param from execute. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 6 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/jsapi/fxjs_v8.cpp ('k') | fpdfsdk/jsapi/include/fxjs_v8.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/jsapi/fxjs_v8_embeddertest.cpp
diff --git a/fpdfsdk/jsapi/fxjs_v8_embeddertest.cpp b/fpdfsdk/jsapi/fxjs_v8_embeddertest.cpp
index a8358c4ee9c5a4806b7d379bf033a5cb2d840973..b33ddca32d95e91c321c728b5d8b6d3aeca0f0b0 100644
--- a/fpdfsdk/jsapi/fxjs_v8_embeddertest.cpp
+++ b/fpdfsdk/jsapi/fxjs_v8_embeddertest.cpp
@@ -19,9 +19,9 @@ const wchar_t kScript2[] = L"fred = 8";
class FXJSV8EmbedderTest : public JSEmbedderTest {
public:
- void ExecuteInCurrentContext(const wchar_t* script) {
+ void ExecuteInCurrentContext(const CFX_WideString& script) {
FXJSErr error;
- int sts = FXJS_Execute(isolate(), nullptr, script, &error);
+ int sts = FXJS_Execute(isolate(), script, &error);
EXPECT_EQ(0, sts);
}
void CheckAssignmentInCurrentContext(double expected) {
@@ -39,7 +39,7 @@ TEST_F(FXJSV8EmbedderTest, Getters) {
v8::HandleScope handle_scope(isolate());
v8::Context::Scope context_scope(GetV8Context());
- ExecuteInCurrentContext(kScript1);
+ ExecuteInCurrentContext(CFX_WideString(kScript1));
CheckAssignmentInCurrentContext(kExpected1);
}
@@ -58,14 +58,14 @@ TEST_F(FXJSV8EmbedderTest, MultipleRutimes) {
&static_objects2);
v8::Context::Scope context_scope(GetV8Context());
- ExecuteInCurrentContext(kScript0);
+ ExecuteInCurrentContext(CFX_WideString(kScript0));
CheckAssignmentInCurrentContext(kExpected0);
{
v8::Local<v8::Context> context1 =
v8::Local<v8::Context>::New(isolate(), global_context1);
v8::Context::Scope context_scope1(context1);
- ExecuteInCurrentContext(kScript1);
+ ExecuteInCurrentContext(CFX_WideString(kScript1));
CheckAssignmentInCurrentContext(kExpected1);
}
FXJS_ReleaseRuntime(isolate(), &global_context1, &static_objects1);
@@ -74,7 +74,7 @@ TEST_F(FXJSV8EmbedderTest, MultipleRutimes) {
v8::Local<v8::Context> context2 =
v8::Local<v8::Context>::New(isolate(), global_context2);
v8::Context::Scope context_scope2(context2);
- ExecuteInCurrentContext(kScript2);
+ ExecuteInCurrentContext(CFX_WideString(kScript2));
CheckAssignmentInCurrentContext(kExpected2);
}
FXJS_ReleaseRuntime(isolate(), &global_context2, &static_objects2);
« no previous file with comments | « fpdfsdk/jsapi/fxjs_v8.cpp ('k') | fpdfsdk/jsapi/include/fxjs_v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698