| Index: Source/bindings/v8/V8PerContextData.h
|
| diff --git a/Source/bindings/v8/V8PerContextData.h b/Source/bindings/v8/V8PerContextData.h
|
| index 1dd1de0222eb4b0dd24c192a13fb516c172907b2..7719358c514066d2b46c41221d1daf08b7d2a795 100644
|
| --- a/Source/bindings/v8/V8PerContextData.h
|
| +++ b/Source/bindings/v8/V8PerContextData.h
|
| @@ -33,6 +33,7 @@
|
|
|
| #include "ScopedPersistent.h"
|
| #include "V8DOMActivityLogger.h"
|
| +#include "V8PerContextDebugData.h"
|
| #include "WrapperTypeInfo.h"
|
| #include <v8.h>
|
| #include <wtf/HashMap.h>
|
| @@ -45,14 +46,6 @@ struct V8NPObject;
|
| typedef WTF::Vector<V8NPObject*> V8NPObjectVector;
|
| typedef WTF::HashMap<int, V8NPObjectVector> V8NPObjectMap;
|
|
|
| -enum V8ContextEmbedderDataField {
|
| - v8ContextDebugIdIndex,
|
| - v8ContextPerContextDataIndex,
|
| - v8ContextIsolatedWorld,
|
| - // Rather than adding more embedder data fields to v8::Context,
|
| - // consider adding the data to V8PerContextData instead.
|
| -};
|
| -
|
| class V8PerContextData {
|
| public:
|
| static PassOwnPtr<V8PerContextData> create(v8::Persistent<v8::Context> context)
|
| @@ -103,10 +96,14 @@ public:
|
| {
|
| m_activityLogger = logger;
|
| }
|
| -
|
| +
|
| private:
|
| explicit V8PerContextData(v8::Persistent<v8::Context> context)
|
| - : m_context(context)
|
| + : m_context(context),
|
| + m_originCategory(CompilationOriginUnset),
|
| + m_contextCategory(CompilationContextUnset),
|
| + m_restrictions(CompilationRestrictionsNone),
|
| + m_debugId(0)
|
| {
|
| }
|
|
|
| @@ -131,12 +128,13 @@ private:
|
| v8::Persistent<v8::Context> m_context;
|
| ScopedPersistent<v8::Value> m_errorPrototype;
|
| ScopedPersistent<v8::Value> m_objectPrototype;
|
| -};
|
| -
|
| -class V8PerContextDebugData {
|
| -public:
|
| - static bool setContextDebugData(v8::Handle<v8::Context>, const char* worldName, int debugId);
|
| - static int contextDebugId(v8::Handle<v8::Context>);
|
| + // Transient values set during compilation into the Context for devtools
|
| + friend class V8PerContextDebugData;
|
| + friend class V8ScopedCompilation;
|
| + CompilationOriginCategory m_originCategory;
|
| + CompilationContextCategory m_contextCategory;
|
| + CompilationRestrictions m_restrictions;
|
| + int m_debugId;
|
| };
|
|
|
| } // namespace WebCore
|
|
|