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

Unified Diff: src/runtime.cc

Issue 7598030: Implement Harmony semantics for typeof null (behind a flag). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 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
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 82733a7c1d35ea4d65646f3e33fc31fca3f5e3bb..4b53ada498f2d7dcc2af206ff10b1c67ad5dd704 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -4853,7 +4853,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Typeof) {
return isolate->heap()->boolean_symbol();
}
if (heap_obj->IsNull()) {
- return isolate->heap()->object_symbol();
+ return FLAG_harmony_typeof ? isolate->heap()->null_symbol()
+ : isolate->heap()->object_symbol();
Kevin Millikin (Chromium) 2011/08/10 09:52:21 Normal V8 style seems to be to break like this: r
rossberg 2011/08/10 12:01:35 Done.
}
ASSERT(heap_obj->IsUndefined());
return isolate->heap()->undefined_symbol();

Powered by Google App Engine
This is Rietveld 408576698