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

Unified Diff: Source/bindings/dart/DartScriptState.h

Issue 24989007: Model each Dart library as its own ScriptState when devtools are enabled. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 7 years, 2 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 | « Source/bindings/dart/DartInjectedScriptHost.cpp ('k') | Source/bindings/dart/DartScriptState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/DartScriptState.h
diff --git a/Source/bindings/dart/ThreadSafeDartIsolateWrapper.h b/Source/bindings/dart/DartScriptState.h
similarity index 72%
copy from Source/bindings/dart/ThreadSafeDartIsolateWrapper.h
copy to Source/bindings/dart/DartScriptState.h
index e1112ddd6a7da81036df6cc7a65a05c5bc74877f..a51fc3c0ece13fdeb08c1a538571d465ac1fc9db 100644
--- a/Source/bindings/dart/ThreadSafeDartIsolateWrapper.h
+++ b/Source/bindings/dart/DartScriptState.h
@@ -1,4 +1,4 @@
-// Copyright 2012, Google Inc.
+// Copyright 2013, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -27,26 +27,32 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef ThreadSafeDartIsolateWrapper_h
-#define ThreadSafeDartIsolateWrapper_h
+#ifndef DartScriptState_h
+#define DartScriptState_h
-#include "bindings/dart/DartIsolateDestructionObserver.h"
+#include "bindings/v8/ScriptState.h"
#include <dart_api.h>
-#include <wtf/RefPtr.h>
-#include <wtf/ThreadSafeRefCounted.h>
namespace WebCore {
-class ThreadSafeDartIsolateWrapper : public ThreadSafeRefCounted<ThreadSafeDartIsolateWrapper>, public DartIsolateDestructionObserver {
- WTF_MAKE_NONCOPYABLE(ThreadSafeDartIsolateWrapper);
+class DartScriptState : public ScriptState {
+ WTF_MAKE_NONCOPYABLE(DartScriptState);
public:
- static PassRefPtr<ThreadSafeDartIsolateWrapper> create();
+ explicit DartScriptState(Dart_Isolate, intptr_t libraryId, v8::Handle<v8::Context>);
+
+ Dart_Isolate isolate() { return m_isolate; }
+ intptr_t libraryId() { return m_libraryId; }
+
+ virtual const String* name() { return &m_libraryUrl; }
+ virtual bool isJavaScript() { return false; }
private:
- ThreadSafeDartIsolateWrapper() { }
+ Dart_Isolate m_isolate;
+ intptr_t m_libraryId;
+ String m_libraryUrl;
};
}
-#endif // ThreadSafeDartIsolateWrapper_h
+#endif // DartScriptState_h
« no previous file with comments | « Source/bindings/dart/DartInjectedScriptHost.cpp ('k') | Source/bindings/dart/DartScriptState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698