OLD | NEW |
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 "src/isolate.h" | 5 #include "src/isolate.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 if (api_interrupts_queue_.empty()) return; | 946 if (api_interrupts_queue_.empty()) return; |
947 entry = api_interrupts_queue_.front(); | 947 entry = api_interrupts_queue_.front(); |
948 api_interrupts_queue_.pop(); | 948 api_interrupts_queue_.pop(); |
949 } | 949 } |
950 VMState<EXTERNAL> state(this); | 950 VMState<EXTERNAL> state(this); |
951 HandleScope handle_scope(this); | 951 HandleScope handle_scope(this); |
952 entry.first(reinterpret_cast<v8::Isolate*>(this), entry.second); | 952 entry.first(reinterpret_cast<v8::Isolate*>(this), entry.second); |
953 } | 953 } |
954 } | 954 } |
955 | 955 |
| 956 void Isolate::RequestMemoryPressureInterrupt( |
| 957 v8::Isolate::MemoryPressureLevel level) { |
| 958 ExecutionAccess access(this); |
| 959 memory_pressure_level_ = level; |
| 960 stack_guard()->RequestMemoryPressureInterrupt(); |
| 961 } |
956 | 962 |
957 void ReportBootstrappingException(Handle<Object> exception, | 963 void ReportBootstrappingException(Handle<Object> exception, |
958 MessageLocation* location) { | 964 MessageLocation* location) { |
959 base::OS::PrintError("Exception thrown during bootstrapping\n"); | 965 base::OS::PrintError("Exception thrown during bootstrapping\n"); |
960 if (location == NULL || location->script().is_null()) return; | 966 if (location == NULL || location->script().is_null()) return; |
961 // We are bootstrapping and caught an error where the location is set | 967 // We are bootstrapping and caught an error where the location is set |
962 // and we have a script for the location. | 968 // and we have a script for the location. |
963 // In this case we could have an extension (or an internal error | 969 // In this case we could have an extension (or an internal error |
964 // somewhere) and we print out the line number at which the error occured | 970 // somewhere) and we print out the line number at which the error occured |
965 // to the console for easier debugging. | 971 // to the console for easier debugging. |
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2975 // Then check whether this scope intercepts. | 2981 // Then check whether this scope intercepts. |
2976 if ((flag & intercept_mask_)) { | 2982 if ((flag & intercept_mask_)) { |
2977 intercepted_flags_ |= flag; | 2983 intercepted_flags_ |= flag; |
2978 return true; | 2984 return true; |
2979 } | 2985 } |
2980 return false; | 2986 return false; |
2981 } | 2987 } |
2982 | 2988 |
2983 } // namespace internal | 2989 } // namespace internal |
2984 } // namespace v8 | 2990 } // namespace v8 |
OLD | NEW |