diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-03 20:12:03 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-03 20:12:03 +0000 |
commit | f65a2326ebb3f10c43931c750ee714d1d959cc19 (patch) | |
tree | 119958a70c12fe7a5f5cf9c7b313bd29fa9fc2d1 | |
parent | dd853ce8497beb3a9346172346771f377760620e (diff) | |
download | chromium_src-f65a2326ebb3f10c43931c750ee714d1d959cc19.zip chromium_src-f65a2326ebb3f10c43931c750ee714d1d959cc19.tar.gz chromium_src-f65a2326ebb3f10c43931c750ee714d1d959cc19.tar.bz2 |
Track v8 API changes.
R=jochen@chromium.org, dcarney@chromium.org
BUG=324225
Review URL: https://codereview.chromium.org/122073003
Patch from Sven Panne <svenpanne@chromium.org>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242916 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/test/base/v8_unit_test.cc | 2 | ||||
-rw-r--r-- | content/public/test/render_view_test.cc | 5 | ||||
-rw-r--r-- | content/renderer/v8_value_converter_impl_unittest.cc | 10 |
3 files changed, 9 insertions, 8 deletions
diff --git a/chrome/test/base/v8_unit_test.cc b/chrome/test/base/v8_unit_test.cc index 623f815..4e0c307 100644 --- a/chrome/test/base/v8_unit_test.cc +++ b/chrome/test/base/v8_unit_test.cc @@ -167,7 +167,7 @@ void V8UnitTest::SetUp() { v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(isolate_); v8::Handle<v8::String> logString = v8::String::NewFromUtf8(isolate_, "log"); v8::Handle<v8::FunctionTemplate> logFunction = - v8::FunctionTemplate::New(&V8UnitTest::Log); + v8::FunctionTemplate::New(isolate_, &V8UnitTest::Log); global->Set(logString, logFunction); // Set up chrome object for chrome.send(). diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc index 64a4d2c..0a7354c 100644 --- a/content/public/test/render_view_test.cc +++ b/content/public/test/render_view_test.cc @@ -259,7 +259,8 @@ gfx::Rect RenderViewTest::GetElementBounds(const std::string& element_id) { std::string script = ReplaceStringPlaceholders(kGetCoordinatesScript, params, NULL); - v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); + v8::Isolate* isolate = v8::Isolate::GetCurrent(); + v8::HandleScope handle_scope(isolate); v8::Handle<v8::Value> value = GetMainFrame()->executeScriptAndReturnValue( WebScriptSource(WebString::fromUTF8(script))); if (value.IsEmpty() || !value->IsArray()) @@ -270,7 +271,7 @@ gfx::Rect RenderViewTest::GetElementBounds(const std::string& element_id) { return gfx::Rect(); std::vector<int> coords; for (int i = 0; i < 4; ++i) { - v8::Handle<v8::Number> index = v8::Number::New(i); + v8::Handle<v8::Number> index = v8::Number::New(isolate, i); v8::Local<v8::Value> value = array->Get(index); if (value.IsEmpty() || !value->IsInt32()) return gfx::Rect(); diff --git a/content/renderer/v8_value_converter_impl_unittest.cc b/content/renderer/v8_value_converter_impl_unittest.cc index 9853e51..5252939 100644 --- a/content/renderer/v8_value_converter_impl_unittest.cc +++ b/content/renderer/v8_value_converter_impl_unittest.cc @@ -154,7 +154,7 @@ class V8ValueConverterImplTest : public testing::Test { EXPECT_FALSE(raw.get()); } - v8::Handle<v8::Object> object(v8::Object::New()); + v8::Handle<v8::Object> object(v8::Object::New(isolate_)); object->Set(v8::String::NewFromUtf8(isolate_, "test"), val); scoped_ptr<base::DictionaryValue> dictionary( static_cast<base::DictionaryValue*>( @@ -455,7 +455,7 @@ TEST_F(V8ValueConverterImplTest, RecursiveObjects) { V8ValueConverterImpl converter; - v8::Handle<v8::Object> object = v8::Object::New().As<v8::Object>(); + v8::Handle<v8::Object> object = v8::Object::New(isolate_).As<v8::Object>(); ASSERT_FALSE(object.IsEmpty()); object->Set(v8::String::NewFromUtf8(isolate_, "foo"), v8::String::NewFromUtf8(isolate_, "bar")); @@ -636,7 +636,7 @@ TEST_F(V8ValueConverterImplTest, DetectCycles) { // Now create a recursive object const std::string key("key"); - v8::Handle<v8::Object> recursive_object(v8::Object::New()); + v8::Handle<v8::Object> recursive_object(v8::Object::New(isolate_)); v8::TryCatch try_catch; recursive_object->Set( v8::String::NewFromUtf8( @@ -666,11 +666,11 @@ TEST_F(V8ValueConverterImplTest, MaxRecursionDepth) { int kDepth = 1000; const char kKey[] = "key"; - v8::Local<v8::Object> deep_object = v8::Object::New(); + v8::Local<v8::Object> deep_object = v8::Object::New(isolate_); v8::Local<v8::Object> leaf = deep_object; for (int i = 0; i < kDepth; ++i) { - v8::Local<v8::Object> new_object = v8::Object::New(); + v8::Local<v8::Object> new_object = v8::Object::New(isolate_); leaf->Set(v8::String::NewFromUtf8(isolate_, kKey), new_object); leaf = new_object; } |