Skip to content

Instantly share code, notes, and snippets.

@mraleph
Created April 26, 2011 19:33
Show Gist options
  • Save mraleph/942933 to your computer and use it in GitHub Desktop.
Save mraleph/942933 to your computer and use it in GitHub Desktop.
diff --git a/src/runtime.cc b/src/runtime.cc
index d8aaf71..ff05037 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -2713,7 +2713,7 @@ MUST_USE_RESULT static MaybeObject* StringReplaceRegExpWithEmptyString(
end = RegExpImpl::GetCapture(match_info_array, 1);
}
- int length = subject->length();
+ int length = subject_handle->length();
int new_length = length - (end - start);
if (new_length == 0) {
return isolate->heap()->empty_string();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment