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

Unified Diff: src/api.cc

Issue 3613009: Addressing Mads' comments from http://codereview.chromium.org/3585010/show. (Closed)
Patch Set: Created 10 years, 2 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 | « include/v8.h ('k') | src/execution.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 37c3bfe476e93b41078e77d9daf55a426469b03c..962723d4e8811b831b1f637b003a1e32a5dd887f 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -3754,14 +3754,9 @@ Local<v8::RegExp> v8::RegExp::New(Handle<String> pattern,
LOG_API("RegExp::New");
ENTER_V8;
EXCEPTION_PREAMBLE();
- i::Handle<i::String> flags_string = RegExpFlagsToString(flags);
- i::Object** argv[2] = {
- i::Handle<i::Object>::cast(Utils::OpenHandle(*pattern)).location(),
- i::Handle<i::Object>::cast(flags_string).location()
- };
- i::Handle<i::Object> obj = i::Execution::New(
- i::Handle<i::JSFunction>(i::Top::global_context()->regexp_function()),
- 2, argv,
+ i::Handle<i::JSRegExp> obj = i::Execution::NewJSRegExp(
+ Utils::OpenHandle(*pattern),
+ RegExpFlagsToString(flags),
&has_pending_exception);
EXCEPTION_BAILOUT_CHECK(Local<v8::RegExp>());
return Utils::ToLocal(i::Handle<i::JSRegExp>::cast(obj));
« no previous file with comments | « include/v8.h ('k') | src/execution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698