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

Unified Diff: src/runtime/runtime-debug.cc

Issue 2601503002: Add Object::IsNullOrUndefined(Isolate*) helper method (Closed)
Patch Set: fixing merge conflicts Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-array.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 281ba29695d54ebd8d26aba7376706641180dbc9..fe8ae95d3b85d97abc1159e64f6c2a113eb363dd 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -80,8 +80,7 @@ RUNTIME_FUNCTION(Runtime_HandleDebuggerStatement) {
RUNTIME_FUNCTION(Runtime_SetDebugEventListener) {
SealHandleScope shs(isolate);
DCHECK_EQ(2, args.length());
- CHECK(args[0]->IsJSFunction() || args[0]->IsUndefined(isolate) ||
- args[0]->IsNull(isolate));
+ CHECK(args[0]->IsJSFunction() || args[0]->IsNullOrUndefined(isolate));
CONVERT_ARG_HANDLE_CHECKED(Object, callback, 0);
CONVERT_ARG_HANDLE_CHECKED(Object, data, 1);
isolate->debug()->SetEventListener(callback, data);
@@ -1702,13 +1701,13 @@ Handle<Object> ScriptLocationFromLine(Isolate* isolate, Handle<Script> script,
// additionally subtracting corresponding offsets.
int32_t line = 0;
- if (!opt_line->IsNull(isolate) && !opt_line->IsUndefined(isolate)) {
+ if (!opt_line->IsNullOrUndefined(isolate)) {
CHECK(opt_line->IsNumber());
line = NumberToInt32(*opt_line) - script->line_offset();
}
int32_t column = 0;
- if (!opt_column->IsNull(isolate) && !opt_column->IsUndefined(isolate)) {
+ if (!opt_column->IsNullOrUndefined(isolate)) {
CHECK(opt_column->IsNumber());
column = NumberToInt32(*opt_column);
if (line == 0) column -= script->column_offset();
« no previous file with comments | « src/runtime/runtime-array.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698