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

Side by Side Diff: src/isolate.cc

Issue 1777883002: Add memory pressure interrupt for memory pressure notification Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« include/v8.h ('K') | « src/isolate.h ('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 // 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
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 ExecutionAccess access(this);
958 stack_guard()->RequestMemoryPressureInterrupt();
959 }
956 960
957 void ReportBootstrappingException(Handle<Object> exception, 961 void ReportBootstrappingException(Handle<Object> exception,
958 MessageLocation* location) { 962 MessageLocation* location) {
959 base::OS::PrintError("Exception thrown during bootstrapping\n"); 963 base::OS::PrintError("Exception thrown during bootstrapping\n");
960 if (location == NULL || location->script().is_null()) return; 964 if (location == NULL || location->script().is_null()) return;
961 // We are bootstrapping and caught an error where the location is set 965 // We are bootstrapping and caught an error where the location is set
962 // and we have a script for the location. 966 // and we have a script for the location.
963 // In this case we could have an extension (or an internal error 967 // 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 968 // somewhere) and we print out the line number at which the error occured
965 // to the console for easier debugging. 969 // to the console for easier debugging.
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after
2975 // Then check whether this scope intercepts. 2979 // Then check whether this scope intercepts.
2976 if ((flag & intercept_mask_)) { 2980 if ((flag & intercept_mask_)) {
2977 intercepted_flags_ |= flag; 2981 intercepted_flags_ |= flag;
2978 return true; 2982 return true;
2979 } 2983 }
2980 return false; 2984 return false;
2981 } 2985 }
2982 2986
2983 } // namespace internal 2987 } // namespace internal
2984 } // namespace v8 2988 } // namespace v8
OLDNEW
« include/v8.h ('K') | « src/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698