Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: src/runtime/runtime-regexp.cc

Issue 952303002: Remove NativeContext from Literal array, since we always create the literals in the native context … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-literals.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-regexp.cc
diff --git a/src/runtime/runtime-regexp.cc b/src/runtime/runtime-regexp.cc
index 932ebbb05941b0aee4ca11fec040eccb18ba8aa8..69d0d9b5e1c39d8e76788468eb3c806285bd3ab1 100644
--- a/src/runtime/runtime-regexp.cc
+++ b/src/runtime/runtime-regexp.cc
@@ -925,13 +925,7 @@ RUNTIME_FUNCTION(Runtime_MaterializeRegExpLiteral) {
CONVERT_ARG_HANDLE_CHECKED(String, pattern, 2);
CONVERT_ARG_HANDLE_CHECKED(String, flags, 3);
- // Get the RegExp function from the context in the literals array.
- // This is the RegExp function from the context in which the
- // function was created. We do not use the RegExp function from the
- // current native context because this might be the RegExp function
- // from another context which we should not have access to.
- Handle<JSFunction> constructor = Handle<JSFunction>(
- JSFunction::NativeContextFromLiterals(*literals)->regexp_function());
+ Handle<JSFunction> constructor = isolate->regexp_function();
// Compute the regular expression literal.
Handle<Object> regexp;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
« no previous file with comments | « src/runtime/runtime-literals.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698