Fix null handle deref in InternalDateFormat
R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/22927014 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
c3778ade30
commit
bd30d3aa54
@ -13649,7 +13649,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_InternalDateFormat) {
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSDate, date, 1);
|
||||
|
||||
bool has_pending_exception = false;
|
||||
double millis = Execution::ToNumber(date, &has_pending_exception)->Number();
|
||||
Handle<Object> value = Execution::ToNumber(date, &has_pending_exception);
|
||||
if (has_pending_exception) {
|
||||
ASSERT(isolate->has_pending_exception());
|
||||
return Failure::Exception();
|
||||
@ -13660,7 +13660,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_InternalDateFormat) {
|
||||
if (!date_format) return isolate->ThrowIllegalOperation();
|
||||
|
||||
icu::UnicodeString result;
|
||||
date_format->format(millis, result);
|
||||
date_format->format(value->Number(), result);
|
||||
|
||||
return *isolate->factory()->NewStringFromTwoByte(
|
||||
Vector<const uint16_t>(
|
||||
|
Loading…
Reference in New Issue
Block a user