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

Unified Diff: runtime/vm/isolate.h

Issue 1666323002: Don't allow oob message interrupts while executing constant expressions in the parser. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: resolve merge conflicts Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 084b8b0f223f458196949b8be849bee66250d40e..f2a0cc3452f74a0f0124181b0ba21cea51d2e952 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -81,6 +81,16 @@ class IsolateVisitor {
};
+// Disallow OOB message handling within this scope.
+class NoOOBMessageScope : public StackResource {
+ public:
+ explicit NoOOBMessageScope(Thread* thread);
+ ~NoOOBMessageScope();
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NoOOBMessageScope);
+};
+
+
class Isolate : public BaseIsolate {
public:
// Keep both these enums in sync with isolate_patch.dart.
@@ -665,6 +675,7 @@ class Isolate : public BaseIsolate {
private:
friend class Dart; // Init, InitOnce, Shutdown.
friend class IsolateKillerVisitor; // Kill().
+ friend class NoOOBMessageScope;
explicit Isolate(const Dart_IsolateFlags& api_flags);
@@ -691,6 +702,9 @@ class Isolate : public BaseIsolate {
user_tag_ = tag;
}
+ void DeferOOBMessageInterrupts();
+ void RestoreOOBMessageInterrupts();
+
RawGrowableObjectArray* GetAndClearPendingServiceExtensionCalls();
RawGrowableObjectArray* pending_service_extension_calls() const {
return pending_service_extension_calls_;
@@ -754,6 +768,8 @@ class Isolate : public BaseIsolate {
Simulator* simulator_;
Mutex* mutex_; // protects stack_limit_, saved_stack_limit_, compiler stats.
uword saved_stack_limit_;
+ uword deferred_interrupts_mask_;
+ uword deferred_interrupts_;
uword stack_overflow_flags_;
int32_t stack_overflow_count_;
MessageHandler* message_handler_;
@@ -876,6 +892,7 @@ REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION)
friend class ServiceIsolate;
friend class Thread;
friend class Timeline;
+ friend class IsolateTestHelper;
DISALLOW_COPY_AND_ASSIGN(Isolate);
};
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698