ValueSerializer: promote scheduled exception if the caller throws one.

v8::Isolate::Throw only schedules the exception; it is necessary to promote it
after invoking the delegate.

BUG=chromium:148757

Review-Url: https://codereview.chromium.org/2332843003
Cr-Commit-Position: refs/heads/master@{#39395}
This commit is contained in:
jbroman 2016-09-13 19:04:49 -07:00 committed by Commit bot
parent edb4d3151c
commit 3472b57a8f

View File

@ -744,6 +744,9 @@ void ValueSerializer::ThrowDataCloneError(
isolate_->Throw(
*isolate_->factory()->NewError(isolate_->error_function(), message));
}
if (isolate_->has_scheduled_exception()) {
isolate_->PromoteScheduledException();
}
}
ValueDeserializer::ValueDeserializer(Isolate* isolate,