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

Side by Side Diff: Source/bindings/core/v8/V8PerIsolateData.h

Issue 429453010: Drop V8RecursionScope dependency on ExecutionContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reorder cleanup methods per haraken Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/core/v8/ModuleProxy.cpp ('k') | Source/bindings/core/v8/V8PerIsolateData.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 14 matching lines...) Expand all
25 25
26 #ifndef V8PerIsolateData_h 26 #ifndef V8PerIsolateData_h
27 #define V8PerIsolateData_h 27 #define V8PerIsolateData_h
28 28
29 #include "bindings/core/v8/ScopedPersistent.h" 29 #include "bindings/core/v8/ScopedPersistent.h"
30 #include "bindings/core/v8/ScriptState.h" 30 #include "bindings/core/v8/ScriptState.h"
31 #include "bindings/core/v8/V8HiddenValue.h" 31 #include "bindings/core/v8/V8HiddenValue.h"
32 #include "bindings/core/v8/WrapperTypeInfo.h" 32 #include "bindings/core/v8/WrapperTypeInfo.h"
33 #include "gin/public/gin_embedders.h" 33 #include "gin/public/gin_embedders.h"
34 #include "gin/public/isolate_holder.h" 34 #include "gin/public/isolate_holder.h"
35 #include "modules/indexeddb/IDBPendingTransactionMonitor.h"
35 #include "wtf/Forward.h" 36 #include "wtf/Forward.h"
36 #include "wtf/HashMap.h" 37 #include "wtf/HashMap.h"
37 #include "wtf/OwnPtr.h" 38 #include "wtf/OwnPtr.h"
38 #include "wtf/Vector.h" 39 #include "wtf/Vector.h"
39 #include <v8.h> 40 #include <v8.h>
40 41
41 namespace blink { 42 namespace blink {
42 43
43 class DOMDataStore; 44 class DOMDataStore;
44 class GCEventData; 45 class GCEventData;
45 class StringCache; 46 class StringCache;
46 struct WrapperTypeInfo; 47 struct WrapperTypeInfo;
47 48
48 class ExternalStringVisitor; 49 class ExternalStringVisitor;
49 50
50 typedef WTF::Vector<DOMDataStore*> DOMDataStoreList; 51 typedef WTF::Vector<DOMDataStore*> DOMDataStoreList;
51 52
52 class V8PerIsolateData { 53 class V8PerIsolateData {
53 public: 54 public:
54 static v8::Isolate* initialize(); 55 static v8::Isolate* initialize();
55 static V8PerIsolateData* from(v8::Isolate* isolate) 56 static V8PerIsolateData* from(v8::Isolate* isolate)
56 { 57 {
57 ASSERT(isolate); 58 ASSERT(isolate);
58 ASSERT(isolate->GetData(gin::kEmbedderBlink)); 59 ASSERT(isolate->GetData(gin::kEmbedderBlink));
59 return static_cast<V8PerIsolateData*>(isolate->GetData(gin::kEmbedderBli nk)); 60 return static_cast<V8PerIsolateData*>(isolate->GetData(gin::kEmbedderBli nk));
60 } 61 }
61 static void dispose(v8::Isolate*); 62
63 static void willBeDestroyed(v8::Isolate*);
64 static void destroy(v8::Isolate*);
62 static v8::Isolate* mainThreadIsolate(); 65 static v8::Isolate* mainThreadIsolate();
63 66
64 v8::Isolate* isolate() { return m_isolateHolder->isolate(); } 67 v8::Isolate* isolate() { return m_isolateHolder->isolate(); }
65 68
66 v8::Handle<v8::FunctionTemplate> toStringTemplate(); 69 v8::Handle<v8::FunctionTemplate> toStringTemplate();
67 70
68 StringCache* stringCache() { return m_stringCache.get(); } 71 StringCache* stringCache() { return m_stringCache.get(); }
69 72
70 v8::Persistent<v8::Value>& ensureLiveRoot(); 73 v8::Persistent<v8::Value>& ensureLiveRoot();
71 74
(...skipping 20 matching lines...) Expand all
92 void setDOMTemplate(void* domTemplateKey, v8::Handle<v8::FunctionTemplate>); 95 void setDOMTemplate(void* domTemplateKey, v8::Handle<v8::FunctionTemplate>);
93 96
94 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>); 97 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>);
95 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v8::Handle<v8::Value>); 98 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v8::Handle<v8::Value>);
96 99
97 v8::Local<v8::Context> ensureScriptRegexpContext(); 100 v8::Local<v8::Context> ensureScriptRegexpContext();
98 101
99 const char* previousSamplingState() const { return m_previousSamplingState; } 102 const char* previousSamplingState() const { return m_previousSamplingState; }
100 void setPreviousSamplingState(const char* name) { m_previousSamplingState = name; } 103 void setPreviousSamplingState(const char* name) { m_previousSamplingState = name; }
101 104
105 IDBPendingTransactionMonitor* ensureIDBPendingTransactionMonitor();
106
102 private: 107 private:
103 V8PerIsolateData(); 108 V8PerIsolateData();
104 ~V8PerIsolateData(); 109 ~V8PerIsolateData();
105 110
106 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate> > DOMTemplate Map; 111 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate> > DOMTemplate Map;
107 DOMTemplateMap& currentDOMTemplateMap(); 112 DOMTemplateMap& currentDOMTemplateMap();
108 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateM ap&); 113 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateM ap&);
109 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateMap&); 114 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateMap&);
110 115
111 OwnPtr<gin::IsolateHolder> m_isolateHolder; 116 OwnPtr<gin::IsolateHolder> m_isolateHolder;
(...skipping 11 matching lines...) Expand all
123 friend class ConstructorMode; 128 friend class ConstructorMode;
124 129
125 int m_recursionLevel; 130 int m_recursionLevel;
126 bool m_isHandlingRecursionLevelError; 131 bool m_isHandlingRecursionLevelError;
127 132
128 #if ENABLE(ASSERT) 133 #if ENABLE(ASSERT)
129 int m_internalScriptRecursionLevel; 134 int m_internalScriptRecursionLevel;
130 #endif 135 #endif
131 OwnPtr<GCEventData> m_gcEventData; 136 OwnPtr<GCEventData> m_gcEventData;
132 bool m_performingMicrotaskCheckpoint; 137 bool m_performingMicrotaskCheckpoint;
138
139 OwnPtr<IDBPendingTransactionMonitor> m_idbPendingTransactionMonitor;
133 }; 140 };
134 141
135 } // namespace blink 142 } // namespace blink
136 143
137 #endif // V8PerIsolateData_h 144 #endif // V8PerIsolateData_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ModuleProxy.cpp ('k') | Source/bindings/core/v8/V8PerIsolateData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698