| OLD | NEW |
| 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 13 matching lines...) Expand all Loading... |
| 24 */ | 24 */ |
| 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 "core/CoreExport.h" | 33 #include "core/CoreExport.h" |
| 34 #include "core/inspector/PerIsolateDebuggerClient.h" |
| 34 #include "gin/public/isolate_holder.h" | 35 #include "gin/public/isolate_holder.h" |
| 35 #include "wtf/HashMap.h" | 36 #include "wtf/HashMap.h" |
| 36 #include "wtf/Noncopyable.h" | 37 #include "wtf/Noncopyable.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; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 void setPreviousSamplingState(const char* name) { m_previousSamplingState =
name; } | 111 void setPreviousSamplingState(const char* name) { m_previousSamplingState =
name; } |
| 111 | 112 |
| 112 // EndOfScopeTasks are run by V8RecursionScope when control is returning | 113 // EndOfScopeTasks are run by V8RecursionScope when control is returning |
| 113 // to C++ from script, after executing a script task (e.g. callback, | 114 // to C++ from script, after executing a script task (e.g. callback, |
| 114 // event) or microtasks (e.g. promise). This is explicitly needed for | 115 // event) or microtasks (e.g. promise). This is explicitly needed for |
| 115 // Indexed DB transactions per spec, but should in general be avoided. | 116 // Indexed DB transactions per spec, but should in general be avoided. |
| 116 void addEndOfScopeTask(PassOwnPtr<EndOfScopeTask>); | 117 void addEndOfScopeTask(PassOwnPtr<EndOfScopeTask>); |
| 117 void runEndOfScopeTasks(); | 118 void runEndOfScopeTasks(); |
| 118 void clearEndOfScopeTasks(); | 119 void clearEndOfScopeTasks(); |
| 119 | 120 |
| 120 void setScriptDebugServer(PassOwnPtrWillBeRawPtr<ScriptDebugServer>); | 121 void setScriptDebugServer(PassOwnPtrWillBeRawPtr<PerIsolateDebuggerClient>); |
| 121 | 122 |
| 122 private: | 123 private: |
| 123 V8PerIsolateData(); | 124 V8PerIsolateData(); |
| 124 ~V8PerIsolateData(); | 125 ~V8PerIsolateData(); |
| 125 | 126 |
| 126 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate>> DOMTemplateM
ap; | 127 typedef HashMap<const void*, v8::Eternal<v8::FunctionTemplate>> DOMTemplateM
ap; |
| 127 DOMTemplateMap& currentDOMTemplateMap(); | 128 DOMTemplateMap& currentDOMTemplateMap(); |
| 128 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>, DOM
TemplateMap&); | 129 bool hasInstance(const WrapperTypeInfo* untrusted, v8::Local<v8::Value>, DOM
TemplateMap&); |
| 129 v8::Local<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v
8::Local<v8::Value>, DOMTemplateMap&); | 130 v8::Local<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v
8::Local<v8::Value>, DOMTemplateMap&); |
| 130 | 131 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 147 bool m_isHandlingRecursionLevelError; | 148 bool m_isHandlingRecursionLevelError; |
| 148 bool m_isReportingException; | 149 bool m_isReportingException; |
| 149 | 150 |
| 150 #if ENABLE(ASSERT) | 151 #if ENABLE(ASSERT) |
| 151 int m_internalScriptRecursionLevel; | 152 int m_internalScriptRecursionLevel; |
| 152 #endif | 153 #endif |
| 153 bool m_performingMicrotaskCheckpoint; | 154 bool m_performingMicrotaskCheckpoint; |
| 154 | 155 |
| 155 Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks; | 156 Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks; |
| 156 #if ENABLE(OILPAN) | 157 #if ENABLE(OILPAN) |
| 157 CrossThreadPersistent<ScriptDebugServer> m_debugServer; | 158 CrossThreadPersistent<PerIsolateDebuggerClient> m_debugServer; |
| 158 #else | 159 #else |
| 159 OwnPtr<ScriptDebugServer> m_debugServer; | 160 OwnPtr<PerIsolateDebuggerClient> m_debugServer; |
| 160 #endif | 161 #endif |
| 161 }; | 162 }; |
| 162 | 163 |
| 163 } // namespace blink | 164 } // namespace blink |
| 164 | 165 |
| 165 #endif // V8PerIsolateData_h | 166 #endif // V8PerIsolateData_h |
| OLD | NEW |