BUG=chromium:491481
R=mstarzinger@chromium.org
LOG=n
Review URL: https://codereview.chromium.org/
1143223004
Cr-Commit-Position: refs/heads/master@{#28614}
// The following assertion was lifted from the DCHECK inside
// JSFunction::MarkForOptimization().
RUNTIME_ASSERT(function->shared()->allows_lazy_compilation() ||
- !function->shared()->optimization_disabled());
+ (function->code()->kind() == Code::FUNCTION &&
+ !function->shared()->optimization_disabled()));
// If the function is already optimized, just return.
if (function->IsOptimized()) return isolate->heap()->undefined_value();
--- /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
+
+try {
+%OptimizeFunctionOnNextCall(print);
+try {
+ __f_16();
+} catch(e) { print(e); }
+try {
+ __f_10();
+} catch(e) {; }
+} catch(e) {}