diff options
author | Michaƫl Zasso <targos@protonmail.com> | 2019-04-03 08:31:46 +0200 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2019-04-05 08:45:59 -0400 |
commit | c1d61f2b4bbaeec7e84cd64d6ef8a15c45586fe0 (patch) | |
tree | aa4511761e3614ebd6fc38c7243acaba021b02c6 /deps/v8/src/regexp | |
parent | c86883cfacc927c2433af9554ee103b1e6b00589 (diff) | |
download | android-node-v8-c1d61f2b4bbaeec7e84cd64d6ef8a15c45586fe0.tar.gz android-node-v8-c1d61f2b4bbaeec7e84cd64d6ef8a15c45586fe0.tar.bz2 android-node-v8-c1d61f2b4bbaeec7e84cd64d6ef8a15c45586fe0.zip |
deps: patch V8 to 7.4.288.17
Refs: https://github.com/v8/v8/compare/7.4.288.13...7.4.288.17
PR-URL: https://github.com/nodejs/node/pull/27066
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'deps/v8/src/regexp')
-rw-r--r-- | deps/v8/src/regexp/regexp-utils.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/deps/v8/src/regexp/regexp-utils.cc b/deps/v8/src/regexp/regexp-utils.cc index 36bc3e5df6..e2e95493fe 100644 --- a/deps/v8/src/regexp/regexp-utils.cc +++ b/deps/v8/src/regexp/regexp-utils.cc @@ -36,7 +36,7 @@ Handle<String> RegExpUtils::GenericCaptureGetter( namespace { -V8_INLINE bool HasInitialRegExpMap(Isolate* isolate, Handle<JSReceiver> recv) { +V8_INLINE bool HasInitialRegExpMap(Isolate* isolate, JSReceiver recv) { return recv->map() == isolate->regexp_function()->initial_map(); } @@ -47,7 +47,7 @@ MaybeHandle<Object> RegExpUtils::SetLastIndex(Isolate* isolate, uint64_t value) { Handle<Object> value_as_object = isolate->factory()->NewNumberFromInt64(value); - if (HasInitialRegExpMap(isolate, recv)) { + if (HasInitialRegExpMap(isolate, *recv)) { JSRegExp::cast(*recv)->set_last_index(*value_as_object, SKIP_WRITE_BARRIER); return recv; } else { @@ -59,7 +59,7 @@ MaybeHandle<Object> RegExpUtils::SetLastIndex(Isolate* isolate, MaybeHandle<Object> RegExpUtils::GetLastIndex(Isolate* isolate, Handle<JSReceiver> recv) { - if (HasInitialRegExpMap(isolate, recv)) { + if (HasInitialRegExpMap(isolate, *recv)) { return handle(JSRegExp::cast(*recv)->last_index(), isolate); } else { return Object::GetProperty(isolate, recv, @@ -155,9 +155,7 @@ bool RegExpUtils::IsUnmodifiedRegExp(Isolate* isolate, Handle<Object> obj) { JSReceiver recv = JSReceiver::cast(*obj); - // Check the receiver's map. - Handle<JSFunction> regexp_function = isolate->regexp_function(); - if (recv->map() != regexp_function->initial_map()) return false; + if (!HasInitialRegExpMap(isolate, recv)) return false; // Check the receiver's prototype's map. Object proto = recv->map()->prototype(); |