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

Side by Side Diff: src/runtime.cc

Issue 212623002: Merged r20033, r20138 into 3.24 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.24
Patch Set: 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/mips/lithium-codegen-mips.cc ('k') | src/version.cc » ('j') | 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 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 } 1676 }
1677 return current; 1677 return current;
1678 } 1678 }
1679 1679
1680 1680
1681 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetPrototype) { 1681 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetPrototype) {
1682 HandleScope scope(isolate); 1682 HandleScope scope(isolate);
1683 ASSERT(args.length() == 2); 1683 ASSERT(args.length() == 2);
1684 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); 1684 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
1685 CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1); 1685 CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1);
1686 if (obj->IsAccessCheckNeeded() &&
1687 !isolate->MayNamedAccessWrapper(obj,
1688 isolate->factory()->proto_string(),
1689 v8::ACCESS_SET)) {
1690 isolate->ReportFailedAccessCheck(*obj, v8::ACCESS_SET);
1691 RETURN_IF_SCHEDULED_EXCEPTION(isolate);
1692 return isolate->heap()->undefined_value();
1693 }
1686 if (FLAG_harmony_observation && obj->map()->is_observed()) { 1694 if (FLAG_harmony_observation && obj->map()->is_observed()) {
1687 Handle<Object> old_value( 1695 Handle<Object> old_value(
1688 GetPrototypeSkipHiddenPrototypes(isolate, *obj), isolate); 1696 GetPrototypeSkipHiddenPrototypes(isolate, *obj), isolate);
1689 1697
1690 Handle<Object> result = JSObject::SetPrototype(obj, prototype, true); 1698 Handle<Object> result = JSObject::SetPrototype(obj, prototype, true);
1691 RETURN_IF_EMPTY_HANDLE(isolate, result); 1699 RETURN_IF_EMPTY_HANDLE(isolate, result);
1692 1700
1693 Handle<Object> new_value( 1701 Handle<Object> new_value(
1694 GetPrototypeSkipHiddenPrototypes(isolate, *obj), isolate); 1702 GetPrototypeSkipHiddenPrototypes(isolate, *obj), isolate);
1695 if (!new_value->SameValue(*old_value)) { 1703 if (!new_value->SameValue(*old_value)) {
(...skipping 13211 matching lines...) Expand 10 before | Expand all | Expand 10 after
14907 // Handle last resort GC and make sure to allow future allocations 14915 // Handle last resort GC and make sure to allow future allocations
14908 // to grow the heap without causing GCs (if possible). 14916 // to grow the heap without causing GCs (if possible).
14909 isolate->counters()->gc_last_resort_from_js()->Increment(); 14917 isolate->counters()->gc_last_resort_from_js()->Increment();
14910 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14918 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14911 "Runtime::PerformGC"); 14919 "Runtime::PerformGC");
14912 } 14920 }
14913 } 14921 }
14914 14922
14915 14923
14916 } } // namespace v8::internal 14924 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698