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

Side by Side Diff: test/cctest/test-api.h

Issue 2059173002: Reland of place all remaining Oddball checks with new function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months 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 unified diff | Download patch
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/test-dictionary.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/isolate.h" 7 #include "src/isolate.h"
8 #include "src/vm-state.h" 8 #include "src/vm-state.h"
9 #include "test/cctest/cctest.h" 9 #include "test/cctest/cctest.h"
10 10
(...skipping 10 matching lines...) Expand all
21 if (is_runtime) { 21 if (is_runtime) {
22 CHECK(rv.Get()->IsUndefined()); 22 CHECK(rv.Get()->IsUndefined());
23 } else { 23 } else {
24 i::Handle<i::Object> v = v8::Utils::OpenHandle(*rv.Get()); 24 i::Handle<i::Object> v = v8::Utils::OpenHandle(*rv.Get());
25 CHECK_EQ(*v, *o); 25 CHECK_EQ(*v, *o);
26 } 26 }
27 rv.Set(true); 27 rv.Set(true);
28 CHECK(!(*o)->IsTheHole(isolate) && !(*o)->IsUndefined(isolate)); 28 CHECK(!(*o)->IsTheHole(isolate) && !(*o)->IsUndefined(isolate));
29 rv.Set(v8::Local<v8::Object>()); 29 rv.Set(v8::Local<v8::Object>());
30 CHECK((*o)->IsTheHole(isolate) || (*o)->IsUndefined(isolate)); 30 CHECK((*o)->IsTheHole(isolate) || (*o)->IsUndefined(isolate));
31 CHECK_EQ(is_runtime, (*o)->IsTheHole()); 31 CHECK_EQ(is_runtime, (*o)->IsTheHole(isolate));
32 // If CPU profiler is active check that when API callback is invoked 32 // If CPU profiler is active check that when API callback is invoked
33 // VMState is set to EXTERNAL. 33 // VMState is set to EXTERNAL.
34 if (isolate->is_profiling()) { 34 if (isolate->is_profiling()) {
35 CHECK_EQ(v8::EXTERNAL, isolate->current_vm_state()); 35 CHECK_EQ(v8::EXTERNAL, isolate->current_vm_state());
36 CHECK(isolate->external_callback_scope()); 36 CHECK(isolate->external_callback_scope());
37 CHECK_EQ(callback, isolate->external_callback_scope()->callback()); 37 CHECK_EQ(callback, isolate->external_callback_scope()->callback());
38 } 38 }
39 } 39 }
OLDNEW
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/test-dictionary.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698