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

Side by Side Diff: src/isolate.cc

Issue 1293113002: Remove property loads from js builtins objects from runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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
« src/api.cc ('K') | « src/contexts.h ('k') | src/messages.js » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 838
839 const char* const Isolate::kStackOverflowMessage = 839 const char* const Isolate::kStackOverflowMessage =
840 "Uncaught RangeError: Maximum call stack size exceeded"; 840 "Uncaught RangeError: Maximum call stack size exceeded";
841 841
842 842
843 Object* Isolate::StackOverflow() { 843 Object* Isolate::StackOverflow() {
844 HandleScope scope(this); 844 HandleScope scope(this);
845 // At this point we cannot create an Error object using its javascript 845 // At this point we cannot create an Error object using its javascript
846 // constructor. Instead, we copy the pre-constructed boilerplate and 846 // constructor. Instead, we copy the pre-constructed boilerplate and
847 // attach the stack trace as a hidden property. 847 // attach the stack trace as a hidden property.
848 Handle<String> key = factory()->stack_overflow_string(); 848 Handle<JSObject> boilerplate = stack_overflow_boilerplate();
849 Handle<Object> boilerplate = 849 Handle<JSObject> exception = factory()->CopyJSObject(boilerplate);
850 Object::GetProperty(js_builtins_object(), key).ToHandleChecked();
851 if (boilerplate->IsUndefined()) {
852 return Throw(heap()->undefined_value(), nullptr);
853 }
854 Handle<JSObject> exception =
855 factory()->CopyJSObject(Handle<JSObject>::cast(boilerplate));
856 Throw(*exception, nullptr); 850 Throw(*exception, nullptr);
857 851
858 CaptureAndSetSimpleStackTrace(exception, factory()->undefined_value()); 852 CaptureAndSetSimpleStackTrace(exception, factory()->undefined_value());
859 #ifdef VERIFY_HEAP 853 #ifdef VERIFY_HEAP
860 if (FLAG_verify_heap && FLAG_stress_compaction) { 854 if (FLAG_verify_heap && FLAG_stress_compaction) {
861 heap()->CollectAllAvailableGarbage("trigger compaction"); 855 heap()->CollectAllAvailableGarbage("trigger compaction");
862 } 856 }
863 #endif // VERIFY_HEAP 857 #endif // VERIFY_HEAP
864 858
865 return heap()->exception(); 859 return heap()->exception();
(...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after
2817 // Then check whether this scope intercepts. 2811 // Then check whether this scope intercepts.
2818 if ((flag & intercept_mask_)) { 2812 if ((flag & intercept_mask_)) {
2819 intercepted_flags_ |= flag; 2813 intercepted_flags_ |= flag;
2820 return true; 2814 return true;
2821 } 2815 }
2822 return false; 2816 return false;
2823 } 2817 }
2824 2818
2825 } // namespace internal 2819 } // namespace internal
2826 } // namespace v8 2820 } // namespace v8
OLDNEW
« src/api.cc ('K') | « src/contexts.h ('k') | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698