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

Unified Diff: src/objects.cc

Issue 1936983002: Version 5.0.71.44 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.0
Patch Set: Created 4 years, 8 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 | « include/v8-version.h ('k') | test/mjsunit/regress/regress-v8-4972.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 67a59638318844e977ebd41dc875b87bba26e457..a60b2d5428862053378864cb9b92ffee547e0bc5 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -13715,7 +13715,9 @@ void JSFunction::CalculateInstanceSizeForDerivedClass(
for (PrototypeIterator iter(isolate, this,
PrototypeIterator::START_AT_RECEIVER);
!iter.IsAtEnd(); iter.Advance()) {
- JSFunction* func = iter.GetCurrent<JSFunction>();
+ JSReceiver* current = iter.GetCurrent<JSReceiver>();
+ if (!current->IsJSFunction()) break;
+ JSFunction* func = JSFunction::cast(current);
SharedFunctionInfo* shared = func->shared();
expected_nof_properties += shared->expected_nof_properties();
if (!IsSubclassConstructor(shared->kind())) {
« no previous file with comments | « include/v8-version.h ('k') | test/mjsunit/regress/regress-v8-4972.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698