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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 883263004: Allows turning on checked mode on a per-isolate basis (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 profiler_data->Unblock(); 1377 profiler_data->Unblock();
1378 } 1378 }
1379 1379
1380 1380
1381 DART_EXPORT void Dart_ExitIsolate() { 1381 DART_EXPORT void Dart_ExitIsolate() {
1382 CHECK_ISOLATE(Isolate::Current()); 1382 CHECK_ISOLATE(Isolate::Current());
1383 Isolate::SetCurrent(NULL); 1383 Isolate::SetCurrent(NULL);
1384 } 1384 }
1385 1385
1386 1386
1387 DART_EXPORT void Dart_IsolateSetCheckedMode(bool value) {
1388 CHECK_ISOLATE(Isolate::Current());
1389 Isolate::Current()->set_checked_mode(value);
1390 }
1391
1392
1387 static uint8_t* ApiReallocate(uint8_t* ptr, 1393 static uint8_t* ApiReallocate(uint8_t* ptr,
1388 intptr_t old_size, 1394 intptr_t old_size,
1389 intptr_t new_size) { 1395 intptr_t new_size) {
1390 return Api::TopScope(Isolate::Current())->zone()->Realloc<uint8_t>( 1396 return Api::TopScope(Isolate::Current())->zone()->Realloc<uint8_t>(
1391 ptr, old_size, new_size); 1397 ptr, old_size, new_size);
1392 } 1398 }
1393 1399
1394 1400
1395 DART_EXPORT Dart_Handle Dart_CreateSnapshot(uint8_t** buffer, 1401 DART_EXPORT Dart_Handle Dart_CreateSnapshot(uint8_t** buffer,
1396 intptr_t* size) { 1402 intptr_t* size) {
(...skipping 4032 matching lines...) Expand 10 before | Expand all | Expand 10 after
5429 5435
5430 5436
5431 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 5437 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
5432 const char* name, 5438 const char* name,
5433 Dart_ServiceRequestCallback callback, 5439 Dart_ServiceRequestCallback callback,
5434 void* user_data) { 5440 void* user_data) {
5435 Service::RegisterRootEmbedderCallback(name, callback, user_data); 5441 Service::RegisterRootEmbedderCallback(name, callback, user_data);
5436 } 5442 }
5437 5443
5438 } // namespace dart 5444 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698