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

Side by Side Diff: sky/tools/packager/scope.h

Issue 1178213003: Introduce sky_packager (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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/tools/packager/main.cc ('k') | sky/tools/packager/switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SKY_TOOLS_PACKAGER_SCOPE_H_
6 #define SKY_TOOLS_PACKAGER_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(); }
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 // SKY_TOOLS_PACKAGER_SCOPE_H_
OLDNEW
« no previous file with comments | « sky/tools/packager/main.cc ('k') | sky/tools/packager/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698