summaryrefslogtreecommitdiff
path: root/fxjs/cjs_globalconsts.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-02-01 20:24:43 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-01 20:24:43 +0000
commite99ee7f3e550f7706a3e2d8105ccc55553a9badb (patch)
tree253acd8343f135a7bbeef9d80c71564fca6f1a69 /fxjs/cjs_globalconsts.cpp
parentfb25606e584e14d60fc243e8b56eef399a4a54bd (diff)
downloadpdfium-e99ee7f3e550f7706a3e2d8105ccc55553a9badb.tar.xz
Introduce CXFJS_Engine::EngineFromContext/SetEngineInContext helpers
No functional change, but expose helpers likely to be needed by next steps. Rename CXFJS_Engine::CurrentEngineFromIsolate to be more accurately named along the way. Change-Id: Iaf2d15a09cfed85705d24ee056e78edf0660ce59 Reviewed-on: https://pdfium-review.googlesource.com/25090 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjs_globalconsts.cpp')
-rw-r--r--fxjs/cjs_globalconsts.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/fxjs/cjs_globalconsts.cpp b/fxjs/cjs_globalconsts.cpp
index 598479780a..a07bf60302 100644
--- a/fxjs/cjs_globalconsts.cpp
+++ b/fxjs/cjs_globalconsts.cpp
@@ -6,12 +6,12 @@
#include "fxjs/cjs_globalconsts.h"
-#define GLOBAL_STRING(rt, name, value) \
- (rt)->DefineGlobalConst( \
- (name), [](const v8::FunctionCallbackInfo<v8::Value>& info) { \
- info.GetReturnValue().Set( \
- CFXJS_Engine::CurrentEngineFromIsolate(info.GetIsolate()) \
- ->NewString(value)); \
+#define GLOBAL_STRING(rt, name, value) \
+ (rt)->DefineGlobalConst( \
+ (name), [](const v8::FunctionCallbackInfo<v8::Value>& info) { \
+ info.GetReturnValue().Set( \
+ CFXJS_Engine::EngineFromIsolateCurrentContext(info.GetIsolate()) \
+ ->NewString(value)); \
})
// static