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

Unified Diff: src/ast.h

Issue 3031005: [Isolates] Avoid dereferencing Isolate::Current() to check oddball identities... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 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
« no previous file with comments | « src/accessors.cc ('k') | src/builtins.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
===================================================================
--- src/ast.h (revision 5190)
+++ src/ast.h (working copy)
@@ -867,10 +867,17 @@
virtual bool IsCritical();
// Identity testers.
- bool IsNull() const { return handle_.is_identical_to(Factory::null_value()); }
- bool IsTrue() const { return handle_.is_identical_to(Factory::true_value()); }
+ bool IsNull() const {
+ ASSERT(!handle_.is_null());
+ return handle_->IsNull();
+ }
+ bool IsTrue() const {
+ ASSERT(!handle_.is_null());
+ return handle_->IsTrue();
+ }
bool IsFalse() const {
- return handle_.is_identical_to(Factory::false_value());
+ ASSERT(!handle_.is_null());
+ return handle_->IsFalse();
}
Handle<Object> handle() const { return handle_; }
« no previous file with comments | « src/accessors.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698