OLD | NEW |
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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 | 678 |
679 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetConstructTrap) { | 679 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetConstructTrap) { |
680 SealHandleScope shs(isolate); | 680 SealHandleScope shs(isolate); |
681 ASSERT(args.length() == 1); | 681 ASSERT(args.length() == 1); |
682 CONVERT_ARG_CHECKED(JSFunctionProxy, proxy, 0); | 682 CONVERT_ARG_CHECKED(JSFunctionProxy, proxy, 0); |
683 return proxy->construct_trap(); | 683 return proxy->construct_trap(); |
684 } | 684 } |
685 | 685 |
686 | 686 |
687 RUNTIME_FUNCTION(MaybeObject*, Runtime_Fix) { | 687 RUNTIME_FUNCTION(MaybeObject*, Runtime_Fix) { |
688 SealHandleScope shs(isolate); | 688 HandleScope scope(isolate); |
689 ASSERT(args.length() == 1); | 689 ASSERT(args.length() == 1); |
690 CONVERT_ARG_CHECKED(JSProxy, proxy, 0); | 690 CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0); |
691 proxy->Fix(); | 691 JSProxy::Fix(proxy); |
692 return isolate->heap()->undefined_value(); | 692 return isolate->heap()->undefined_value(); |
693 } | 693 } |
694 | 694 |
695 | 695 |
696 void Runtime::FreeArrayBuffer(Isolate* isolate, | 696 void Runtime::FreeArrayBuffer(Isolate* isolate, |
697 JSArrayBuffer* phantom_array_buffer) { | 697 JSArrayBuffer* phantom_array_buffer) { |
698 if (phantom_array_buffer->is_external()) return; | 698 if (phantom_array_buffer->is_external()) return; |
699 | 699 |
700 size_t allocated_length = NumberToSize( | 700 size_t allocated_length = NumberToSize( |
701 isolate, phantom_array_buffer->byte_length()); | 701 isolate, phantom_array_buffer->byte_length()); |
(...skipping 13993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14695 // Handle last resort GC and make sure to allow future allocations | 14695 // Handle last resort GC and make sure to allow future allocations |
14696 // to grow the heap without causing GCs (if possible). | 14696 // to grow the heap without causing GCs (if possible). |
14697 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14697 isolate->counters()->gc_last_resort_from_js()->Increment(); |
14698 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14698 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
14699 "Runtime::PerformGC"); | 14699 "Runtime::PerformGC"); |
14700 } | 14700 } |
14701 } | 14701 } |
14702 | 14702 |
14703 | 14703 |
14704 } } // namespace v8::internal | 14704 } } // namespace v8::internal |
OLD | NEW |