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

Unified Diff: src/objects.cc

Issue 2819653002: Merged: Squashed multiple commits. (Closed)
Patch Set: Created 3 years, 8 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/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 9f9a628062b7db7a5c8cf6f11cd6828d81067725..7902738fc4e77b207f77cee819e027a7e1519330 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -12909,7 +12909,12 @@ void Oddball::Initialize(Isolate* isolate, Handle<Oddball> oddball,
isolate->factory()->InternalizeUtf8String(to_string);
Handle<String> internalized_type_of =
isolate->factory()->InternalizeUtf8String(type_of);
- oddball->set_to_number_raw(to_number->Number());
+ if (to_number->IsHeapNumber()) {
+ oddball->set_to_number_raw_as_bits(
+ Handle<HeapNumber>::cast(to_number)->value_as_bits());
+ } else {
+ oddball->set_to_number_raw(to_number->Number());
+ }
oddball->set_to_number(*to_number);
oddball->set_to_string(*internalized_to_string);
oddball->set_type_of(*internalized_type_of);
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698