Reviewers: mvstanton,
Description:
Correctly load RegExp.source from the holder.
[email protected]
BUG=chromium:447561
Please review this at https://codereview.chromium.org/844193004/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+3, -3 lines):
M src/accessors.cc
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index
6b7ec058d93c59bfda56bf936dba56b5fcee9ecc..662a9e126b04b1bad9489ddb468c09666436eff1
100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -382,9 +382,9 @@ void Accessors::RegExpSourceGetter(
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
HandleScope scope(isolate);
- Handle<Object> receiver =
- Utils::OpenHandle(*v8::Local<v8::Value>(info.This()));
- Handle<JSRegExp> regexp = Handle<JSRegExp>::cast(receiver);
+ Handle<Object> holder =
+ Utils::OpenHandle(*v8::Local<v8::Value>(info.Holder()));
+ Handle<JSRegExp> regexp = Handle<JSRegExp>::cast(holder);
Handle<String> result;
if (regexp->TypeTag() == JSRegExp::NOT_COMPILED) {
result = isolate->factory()->empty_string();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.