R=arv@chromium.org
BUG=chromium:492526
LOG=N
Review URL: https://codereview.chromium.org/
1146923004
Cr-Commit-Position: refs/heads/master@{#28671}
Handle<String> arg0,
Handle<String> arg1,
Handle<String> arg2) {
+ Isolate* isolate = arg0->GetIsolate();
const char* template_string;
switch (template_index) {
#define CASE(NAME, STRING) \
#undef CASE
case kLastMessage:
default:
- UNREACHABLE();
- template_string = "";
- break;
+ isolate->ThrowIllegalOperation();
+ return MaybeHandle<String>();
}
- Isolate* isolate = arg0->GetIsolate();
IncrementalStringBuilder builder(isolate);
unsigned int i = 0;
--- /dev/null
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+assertThrows(function() { %FormatMessageString(-1, "", "", ""); });