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

Unified Diff: src/isolate.h

Issue 99243002: Experimental scanner multithreading fix. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: oops Created 7 years 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 | « no previous file | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index c13714f68246cd7f39702c3a1e998ae91df7a116..12afd5f22848231da249f5509ab9b7a5db5198e3 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -28,6 +28,8 @@
#ifndef V8_ISOLATE_H_
#define V8_ISOLATE_H_
+#include <set>
+
#include "../include/v8-debug.h"
#include "allocation.h"
#include "apiutils.h"
@@ -82,6 +84,7 @@ class RegExpStack;
class SaveContext;
class UnicodeCache;
class ConsStringIteratorOp;
+class ScannerBase;
class StringTracker;
class StubCache;
class SweeperThread;
@@ -1142,6 +1145,9 @@ class Isolate {
// Given an address occupied by a live code object, return that object.
Object* FindCodeObject(Address a);
+ void AddScanner(ScannerBase* scanner);
+ void RemoveScanner(ScannerBase* scanner);
+
private:
Isolate();
@@ -1254,6 +1260,9 @@ class Isolate {
// the Error object.
bool IsErrorObject(Handle<Object> obj);
+ static void UpdateScannersAfterGC(v8::Isolate*, GCType, GCCallbackFlags);
+ void UpdateScannersAfterGC();
+
Atomic32 id_;
EntryStackItem* entry_stack_;
int stack_trace_nesting_level_;
@@ -1377,6 +1386,10 @@ class Isolate {
// Counts deopt points if deopt_every_n_times is enabled.
unsigned int stress_deopt_count_;
+ // Stores information about the ScannerBase objects currently alive, so that
+ // we can update the raw string pointers they hold after GC.
+ std::set<ScannerBase*> scanners_;
+
friend class ExecutionAccess;
friend class HandleScopeImplementer;
friend class IsolateInitializer;
« no previous file with comments | « no previous file | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698