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

Unified Diff: src/hydrogen.cc

Issue 10576013: Fix crash bug in Hydrogen occurring with empty prototype chain. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Slava's comment. Created 8 years, 6 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-115100.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 9ef4b5d6d9352e22b4f954bcb58af0d825d4666f..4459db8107b849ce41faa5f3e239a80372493156 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -4951,7 +4951,7 @@ HInstruction* HGraphBuilder::BuildStoreNamedField(HValue* object,
// If the property does not exist yet, we have to check that it wasn't made
// readonly or turned into a setter by some meanwhile modifications on the
// prototype chain.
- if (!lookup->IsProperty()) {
+ if (!lookup->IsProperty() && type->prototype()->IsJSReceiver()) {
Object* proto = type->prototype();
// First check that the prototype chain isn't affected already.
LookupResult proto_result(isolate());
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-115100.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698