Chromium Code Reviews| Index: test/cctest/test-typedarrays.cc |
| diff --git a/test/cctest/test-typedarrays.cc b/test/cctest/test-typedarrays.cc |
| index c4773925e3b9369f0fe85962bfa8f56efd651d37..83a38396aeb2c77cd77935f0d326d86fcacae040 100644 |
| --- a/test/cctest/test-typedarrays.cc |
| +++ b/test/cctest/test-typedarrays.cc |
| @@ -2,6 +2,9 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +// TODO(mythria): Remove this define after this flag is turned on globally |
| +#define V8_IMMINENT_DEPRECATION_WARNINGS |
| + |
| #include <stdlib.h> |
| #include "src/v8.h" |
| @@ -14,8 +17,12 @@ |
| using namespace v8::internal; |
| void TestArrayBufferViewContents(LocalContext& env, bool should_use_buffer) { |
| - v8::Local<v8::Object> obj_a = |
| - v8::Local<v8::Object>::Cast(env->Global()->Get(v8_str("a"))); |
| + v8::Local<v8::Context> context = |
| + reinterpret_cast<v8::Isolate*>( |
| + v8::Utils::OpenHandle(*env->Global())->GetIsolate()) |
| + ->GetCurrentContext(); |
|
rmcilroy
2015/09/15 10:29:47
Can you not just do: v8::Isolate::GetCurrent()->Ge
mythria
2015/09/17 11:21:48
Done.
|
| + v8::Local<v8::Object> obj_a = v8::Local<v8::Object>::Cast( |
| + env->Global()->Get(context, v8_str("a")).ToLocalChecked()); |
| CHECK(obj_a->IsArrayBufferView()); |
| v8::Local<v8::ArrayBufferView> array_buffer_view = |
| v8::Local<v8::ArrayBufferView>::Cast(obj_a); |