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

Unified Diff: test/cctest/test-global-handles.cc

Issue 1449393002: Remove deprecated functions the smaller half of the remaing tests (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « test/cctest/test-fuzz-arm64.cc ('k') | test/cctest/test-global-object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-global-handles.cc
diff --git a/test/cctest/test-global-handles.cc b/test/cctest/test-global-handles.cc
index cc95df21cf7f763c784ee8f85cbfb1a69c4abc7d..303f076daeb0d05a3a3743efa9a127f67159e263 100644
--- a/test/cctest/test-global-handles.cc
+++ b/test/cctest/test-global-handles.cc
@@ -25,6 +25,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// TODO(jochen): Remove this after the setting is turned on globally.
+#define V8_IMMINENT_DEPRECATION_WARNINGS
+
#include "src/global-handles.h"
#include "test/cctest/cctest.h"
@@ -337,7 +340,9 @@ TEST(EternalHandles) {
indices[i] = -1;
HandleScope scope(isolate);
v8::Local<v8::Object> object = v8::Object::New(v8_isolate);
- object->Set(i, v8::Integer::New(v8_isolate, i));
+ object->Set(v8_isolate->GetCurrentContext(), i,
+ v8::Integer::New(v8_isolate, i))
+ .FromJust();
// Create with internal api
eternal_handles->Create(
isolate, *v8::Utils::OpenHandle(*object), &indices[i]);
@@ -360,10 +365,12 @@ TEST(EternalHandles) {
// Test external api
local = eternals[i].Get(v8_isolate);
}
- v8::Local<v8::Object> object = v8::Handle<v8::Object>::Cast(local);
- v8::Local<v8::Value> value = object->Get(i);
+ v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(local);
+ v8::Local<v8::Value> value =
+ object->Get(v8_isolate->GetCurrentContext(), i).ToLocalChecked();
CHECK(value->IsInt32());
- CHECK_EQ(i, value->Int32Value());
+ CHECK_EQ(i,
+ value->Int32Value(v8_isolate->GetCurrentContext()).FromJust());
}
}
« no previous file with comments | « test/cctest/test-fuzz-arm64.cc ('k') | test/cctest/test-global-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698