Commit 9da8b1aa authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[runtime] Fix an object reference in WriteJSRegExp

... by handlifying its argument.

Bug: v8:9989
Change-Id: Ie56a8beb52372c6f77aa855319c3af5e429bfd04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1926149Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65082}
parent 3dbc1a8e
...@@ -553,7 +553,7 @@ Maybe<bool> ValueSerializer::WriteJSReceiver(Handle<JSReceiver> receiver) { ...@@ -553,7 +553,7 @@ Maybe<bool> ValueSerializer::WriteJSReceiver(Handle<JSReceiver> receiver) {
return WriteJSPrimitiveWrapper( return WriteJSPrimitiveWrapper(
Handle<JSPrimitiveWrapper>::cast(receiver)); Handle<JSPrimitiveWrapper>::cast(receiver));
case JS_REG_EXP_TYPE: case JS_REG_EXP_TYPE:
WriteJSRegExp(JSRegExp::cast(*receiver)); WriteJSRegExp(Handle<JSRegExp>::cast(receiver));
return ThrowIfOutOfMemory(); return ThrowIfOutOfMemory();
case JS_MAP_TYPE: case JS_MAP_TYPE:
return WriteJSMap(Handle<JSMap>::cast(receiver)); return WriteJSMap(Handle<JSMap>::cast(receiver));
...@@ -791,10 +791,10 @@ Maybe<bool> ValueSerializer::WriteJSPrimitiveWrapper( ...@@ -791,10 +791,10 @@ Maybe<bool> ValueSerializer::WriteJSPrimitiveWrapper(
return ThrowIfOutOfMemory(); return ThrowIfOutOfMemory();
} }
void ValueSerializer::WriteJSRegExp(JSRegExp regexp) { void ValueSerializer::WriteJSRegExp(Handle<JSRegExp> regexp) {
WriteTag(SerializationTag::kRegExp); WriteTag(SerializationTag::kRegExp);
WriteString(handle(regexp.Pattern(), isolate_)); WriteString(handle(regexp->Pattern(), isolate_));
WriteVarint(static_cast<uint32_t>(regexp.GetFlags())); WriteVarint(static_cast<uint32_t>(regexp->GetFlags()));
} }
Maybe<bool> ValueSerializer::WriteJSMap(Handle<JSMap> map) { Maybe<bool> ValueSerializer::WriteJSMap(Handle<JSMap> map) {
......
...@@ -120,7 +120,7 @@ class ValueSerializer { ...@@ -120,7 +120,7 @@ class ValueSerializer {
void WriteJSDate(JSDate date); void WriteJSDate(JSDate date);
Maybe<bool> WriteJSPrimitiveWrapper(Handle<JSPrimitiveWrapper> value) Maybe<bool> WriteJSPrimitiveWrapper(Handle<JSPrimitiveWrapper> value)
V8_WARN_UNUSED_RESULT; V8_WARN_UNUSED_RESULT;
void WriteJSRegExp(JSRegExp regexp); void WriteJSRegExp(Handle<JSRegExp> regexp);
Maybe<bool> WriteJSMap(Handle<JSMap> map) V8_WARN_UNUSED_RESULT; Maybe<bool> WriteJSMap(Handle<JSMap> map) V8_WARN_UNUSED_RESULT;
Maybe<bool> WriteJSSet(Handle<JSSet> map) V8_WARN_UNUSED_RESULT; Maybe<bool> WriteJSSet(Handle<JSSet> map) V8_WARN_UNUSED_RESULT;
Maybe<bool> WriteJSArrayBuffer(Handle<JSArrayBuffer> array_buffer) Maybe<bool> WriteJSArrayBuffer(Handle<JSArrayBuffer> array_buffer)
......
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