Commit 3a53f2fd authored by yangguo's avatar yangguo Committed by Commit bot

Correctly load RegExp.source from the holder.

R=mvstanton@chromium.org
BUG=chromium:447561
LOG=N

Review URL: https://codereview.chromium.org/844193004

Cr-Commit-Position: refs/heads/master@{#26125}
parent f578d35b
......@@ -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();
......
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