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

Side by Side Diff: Source/bindings/core/dart/DartScriptState.cpp

Issue 974273003: Revert "Revert "Support multiple DOM isolates and tweak devtools frontend to better handle large #s… (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 5 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 #include "bindings/core/dart/DartScriptState.h" 32 #include "bindings/core/dart/DartScriptState.h"
33 33
34 #include "bindings/core/dart/DartScriptPromise.h" 34 #include "bindings/core/dart/DartScriptPromise.h"
35 #include "bindings/core/dart/DartScriptPromiseResolver.h" 35 #include "bindings/core/dart/DartScriptPromiseResolver.h"
36 #include "bindings/core/dart/DartUtilities.h" 36 #include "bindings/core/dart/DartUtilities.h"
37 #include "platform/SharedBuffer.h" 37 #include "platform/SharedBuffer.h"
38 #include <dart_debugger_api.h> 38 #include <dart_debugger_api.h>
39 39
40 namespace blink { 40 namespace blink {
41 41
42 DartScriptState::DartScriptState(Dart_Isolate isolate, intptr_t libraryId, V8Scr iptState* v8ScriptState) 42 DartScriptState::DartScriptState(Dart_Isolate isolate, intptr_t libraryId, V8Scr iptState* v8ScriptState, const String& isolateName)
43 { 43 {
44 m_isolate = isolate; 44 m_isolate = isolate;
45 m_libraryId = libraryId; 45 m_libraryId = libraryId;
46 m_libraryUrl = DartUtilities::toString(Dart_GetLibraryURL(libraryId)); 46 String libraryUrl = DartUtilities::toString(Dart_GetLibraryURL(libraryId));
47 if (!isolateName.isEmpty()) {
48 m_name = String::format("%s - %s", isolateName.utf8().data(), libraryUrl .utf8().data());
49 } else {
50 m_name = libraryUrl;
51 }
47 m_v8ScriptState = v8ScriptState; 52 m_v8ScriptState = v8ScriptState;
48 } 53 }
49 54
50 bool DartScriptState::contextIsValid() const 55 bool DartScriptState::contextIsValid() const
51 { 56 {
52 if (m_v8ScriptState) 57 if (m_v8ScriptState)
53 return m_v8ScriptState->contextIsValid(); 58 return m_v8ScriptState->contextIsValid();
54 return true; 59 return true;
55 } 60 }
56 61
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 129
125 #ifndef NDEBUG 130 #ifndef NDEBUG
126 void DartScriptState::assertPrimaryKeyValidOrInjectable(PassRefPtr<SharedBuffer> buffer, const Vector<blink::WebBlobInfo>* blobInfo, IDBKey* key, const IDBKeyPa th& keyPath) 131 void DartScriptState::assertPrimaryKeyValidOrInjectable(PassRefPtr<SharedBuffer> buffer, const Vector<blink::WebBlobInfo>* blobInfo, IDBKey* key, const IDBKeyPa th& keyPath)
127 { 132 {
128 // FIXMEDART: Implement without Dart<->V8 conversion. 133 // FIXMEDART: Implement without Dart<->V8 conversion.
129 return v8ScriptState()->assertPrimaryKeyValidOrInjectable(buffer, blobInfo, key, keyPath); 134 return v8ScriptState()->assertPrimaryKeyValidOrInjectable(buffer, blobInfo, key, keyPath);
130 } 135 }
131 #endif 136 #endif
132 137
133 } // namespace blink 138 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/dart/DartScriptState.h ('k') | Source/devtools/front_end/console/ConsoleView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698