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

Side by Side Diff: sky/engine/core/script/dom_dart_state.cc

Issue 1203143004: Make it possible to run Sky apps offline (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: gn check Created 5 years, 5 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
« no previous file with comments | « sky/engine/core/script/dom_dart_state.h ('k') | sky/engine/public/platform/WebString.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/engine/core/script/dom_dart_state.h" 5 #include "sky/engine/core/script/dom_dart_state.h"
6 6
7 #include "sky/engine/core/dom/Document.h" 7 #include "sky/engine/core/dom/Document.h"
8 #include "sky/engine/tonic/dart_builtin.h" 8 #include "sky/engine/tonic/dart_builtin.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 DOMDartState::DOMDartState(Document* document, const KURL& url) 12 DOMDartState::DOMDartState(Document* document, const String& url)
13 : document_(document), url_(url) { 13 : document_(document), url_(url) {
14 } 14 }
15 15
16 DOMDartState::~DOMDartState() { 16 DOMDartState::~DOMDartState() {
17 // We've already destroyed the isolate. Revoke any weak ptrs held by 17 // We've already destroyed the isolate. Revoke any weak ptrs held by
18 // DartPersistentValues so they don't try to enter the destroyed isolate to 18 // DartPersistentValues so they don't try to enter the destroyed isolate to
19 // clean themselves up. 19 // clean themselves up.
20 weak_factory_.InvalidateWeakPtrs(); 20 weak_factory_.InvalidateWeakPtrs();
21 } 21 }
22 22
(...skipping 19 matching lines...) Expand all
42 DCHECK(Current()->document_); 42 DCHECK(Current()->document_);
43 return Current()->document_->frame(); 43 return Current()->document_->frame();
44 } 44 }
45 45
46 LocalDOMWindow* DOMDartState::CurrentWindow() { 46 LocalDOMWindow* DOMDartState::CurrentWindow() {
47 DCHECK(Current()->document_); 47 DCHECK(Current()->document_);
48 return Current()->document_->domWindow(); 48 return Current()->document_->domWindow();
49 } 49 }
50 50
51 } // namespace blink 51 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/script/dom_dart_state.h ('k') | sky/engine/public/platform/WebString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698