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

Side by Side Diff: mojo/dart/dart_snapshotter/scope.h

Issue 1273743005: Dart: Adds a program to create snapshots of Mojo apps. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_DART_DART_SNAPSHOTTER_SCOPE_H_
6 #define MOJO_DART_DART_SNAPSHOTTER_SCOPE_H_
7
8 #include "base/basictypes.h"
9 #include "base/logging.h"
10 #include "dart/runtime/include/dart_api.h"
11
12 class DartIsolateScope {
13 public:
14 explicit DartIsolateScope(Dart_Isolate isolate) {
15 CHECK(!Dart_CurrentIsolate());
16 Dart_EnterIsolate(isolate);
17 }
18 ~DartIsolateScope() { Dart_ExitIsolate(); }
Cutch 2015/08/10 20:45:02 Use //tonic/dart_api_scope.h and //tonic/dart_isol
zra 2015/08/10 22:59:22 Done.
19
20 private:
21 DISALLOW_COPY_AND_ASSIGN(DartIsolateScope);
22 };
23
24 class DartApiScope {
25 public:
26 DartApiScope() { Dart_EnterScope(); }
27 ~DartApiScope() { Dart_ExitScope(); }
28
29 private:
30 DISALLOW_COPY_AND_ASSIGN(DartApiScope);
31 };
32
33 #endif // MOJO_DART_DART_SNAPSHOTTER_SCOPE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698