Fix the IsTheHole bug.

For Double constant of non nan, object_ may be uninitialized.

(This patch comes from weiliang.lin@intel.com )

BUG=
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/565183004

Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4ef59157
......@@ -3593,7 +3593,8 @@ class HConstant FINAL : public HTemplateInstruction<0> {
if (HasDoubleValue() && FixedDoubleArray::is_the_hole_nan(double_value_)) {
return true;
}
return object_.IsKnownGlobal(isolate()->heap()->the_hole_value());
return object_.IsInitialized() &&
object_.IsKnownGlobal(isolate()->heap()->the_hole_value());
}
bool HasNumberValue() const { return has_double_value_; }
int32_t NumberValueAsInteger32() const {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment