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

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

Issue 1143223004: Exclude non-optimizable functions from OptimizeFunctionOnNextCall. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Test fix Created 5 years, 7 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 | « no previous file | test/mjsunit/regress/regress-491481.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-test.cc
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc
index c281b6fd0418d41afd026b3ac11db49364601f84..2c38f12eb77c47f8606d9354d67d575f498d4e51 100644
--- a/src/runtime/runtime-test.cc
+++ b/src/runtime/runtime-test.cc
@@ -88,7 +88,8 @@ RUNTIME_FUNCTION(Runtime_OptimizeFunctionOnNextCall) {
// 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();
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-491481.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698