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

Unified Diff: src/parser.cc

Issue 10828282: Prevent segfault on undefined inline runtime call. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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-2286.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index b1e2a7c78aa7aa45e8b42baf325e202280e6ab62..cc27d098271d997f40b981ce59d6a8b79f7426ab 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -4804,6 +4804,13 @@ Expression* Parser::ParseV8Intrinsic(bool* ok) {
return NULL;
}
+ // Check that the function is defined if it's a inline runtime call.
Michael Starzinger 2012/08/13 19:04:54 "[...] it's an inline [...]"
+ if (function == NULL && name->Get(0) == '_') {
+ ReportMessage("not_defined", Vector<Handle<String> >(&name, 1));
+ *ok = false;
+ return NULL;
+ }
+
// We have a valid intrinsics call or a call to a builtin.
return factory()->NewCallRuntime(name, function, args);
}
« no previous file with comments | « no previous file | test/mjsunit/regress-2286.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698