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

Side by Side Diff: src/runtime.cc

Issue 204493002: Fix assert in Runtime_SetIsObserved. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Rafael. Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 14634 matching lines...) Expand 10 before | Expand all | Expand 10 after
14645 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, obj, 0); 14645 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, obj, 0);
14646 if (obj->IsJSGlobalProxy()) { 14646 if (obj->IsJSGlobalProxy()) {
14647 Object* proto = obj->GetPrototype(); 14647 Object* proto = obj->GetPrototype();
14648 if (proto->IsNull()) return isolate->heap()->undefined_value(); 14648 if (proto->IsNull()) return isolate->heap()->undefined_value();
14649 ASSERT(proto->IsJSGlobalObject()); 14649 ASSERT(proto->IsJSGlobalObject());
14650 obj = handle(JSReceiver::cast(proto)); 14650 obj = handle(JSReceiver::cast(proto));
14651 } 14651 }
14652 if (obj->IsJSProxy()) 14652 if (obj->IsJSProxy())
14653 return isolate->heap()->undefined_value(); 14653 return isolate->heap()->undefined_value();
14654 14654
14655 ASSERT(!(obj->map()->is_observed() && obj->IsJSObject() &&
14656 Handle<JSObject>::cast(obj)->HasFastElements()));
14657 ASSERT(obj->IsJSObject()); 14655 ASSERT(obj->IsJSObject());
14658 JSObject::SetObserved(Handle<JSObject>::cast(obj)); 14656 JSObject::SetObserved(Handle<JSObject>::cast(obj));
14659 return isolate->heap()->undefined_value(); 14657 return isolate->heap()->undefined_value();
14660 } 14658 }
14661 14659
14662 14660
14663 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetMicrotaskPending) { 14661 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetMicrotaskPending) {
14664 SealHandleScope shs(isolate); 14662 SealHandleScope shs(isolate);
14665 ASSERT(args.length() == 1); 14663 ASSERT(args.length() == 1);
14666 CONVERT_BOOLEAN_ARG_CHECKED(new_state, 0); 14664 CONVERT_BOOLEAN_ARG_CHECKED(new_state, 0);
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
14973 // Handle last resort GC and make sure to allow future allocations 14971 // Handle last resort GC and make sure to allow future allocations
14974 // to grow the heap without causing GCs (if possible). 14972 // to grow the heap without causing GCs (if possible).
14975 isolate->counters()->gc_last_resort_from_js()->Increment(); 14973 isolate->counters()->gc_last_resort_from_js()->Increment();
14976 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14974 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14977 "Runtime::PerformGC"); 14975 "Runtime::PerformGC");
14978 } 14976 }
14979 } 14977 }
14980 14978
14981 14979
14982 } } // namespace v8::internal 14980 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698