Index: src/runtime/runtime-literals.cc |
diff --git a/src/runtime/runtime-literals.cc b/src/runtime/runtime-literals.cc |
index ce1dc243087c16677de572993c174de1940a45a7..01d1fe8aaa6007cf2ebe14701661b0c42e6bae80 100644 |
--- a/src/runtime/runtime-literals.cc |
+++ b/src/runtime/runtime-literals.cc |
@@ -242,13 +242,13 @@ RUNTIME_FUNCTION(Runtime_CreateRegExpLiteral) { |
CONVERT_ARG_HANDLE_CHECKED(JSFunction, closure, 0); |
CONVERT_SMI_ARG_CHECKED(index, 1); |
CONVERT_ARG_HANDLE_CHECKED(String, pattern, 2); |
- CONVERT_ARG_HANDLE_CHECKED(String, flags, 3); |
+ CONVERT_SMI_ARG_CHECKED(flags, 3); |
// Check if boilerplate exists. If not, create it first. |
Handle<Object> boilerplate(closure->literals()->literal(index), isolate); |
if (boilerplate->IsUndefined()) { |
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, boilerplate, |
- JSRegExp::New(pattern, flags)); |
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
+ isolate, boilerplate, JSRegExp::New(pattern, JSRegExp::Flags(flags))); |
closure->literals()->set_literal(index, *boilerplate); |
} |
return *JSRegExp::Copy(Handle<JSRegExp>::cast(boilerplate)); |