From 7fae9959e9490f43453fac72054048321abde1f0 Mon Sep 17 00:00:00 2001 From: "dcarney@chromium.org" Date: Tue, 1 Oct 2013 09:56:04 +0000 Subject: [PATCH] remove Isolate::Current from ScriptData and Script R=mstarzinger@chromium.org BUG= Review URL: https://codereview.chromium.org/25037002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- include/v8.h | 4 +++- src/api.cc | 43 +++++++++++++++++++++++++++++-------------- test/cctest/test-api.cc | 22 ++++++++++++++-------- test/cctest/test-parsing.cc | 11 ++++++----- 4 files changed, 52 insertions(+), 28 deletions(-) diff --git a/include/v8.h b/include/v8.h index 222640a..e3521ad 100644 --- a/include/v8.h +++ b/include/v8.h @@ -885,7 +885,9 @@ class V8_EXPORT ScriptData { // NOLINT * \param input Pointer to UTF-8 script source code. * \param length Length of UTF-8 script source code. */ - static ScriptData* PreCompile(const char* input, int length); + static ScriptData* PreCompile(Isolate* isolate, + const char* input, + int length); /** * Pre-compiles the specified script (context-independent). diff --git a/src/api.cc b/src/api.cc index 105a386..11eaf92 100644 --- a/src/api.cc +++ b/src/api.cc @@ -1646,10 +1646,13 @@ void ObjectTemplate::SetInternalFieldCount(int value) { // --- S c r i p t D a t a --- -ScriptData* ScriptData::PreCompile(const char* input, int length) { +ScriptData* ScriptData::PreCompile(v8::Isolate* isolate, + const char* input, + int length) { i::Utf8ToUtf16CharacterStream stream( reinterpret_cast(input), length); - return i::PreParserApi::PreParse(i::Isolate::Current(), &stream); + return i::PreParserApi::PreParse( + reinterpret_cast(isolate), &stream); } @@ -1696,13 +1699,13 @@ Local