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

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

Issue 1439483003: - Add an OSThread structure which is the generic TLS structure for all C++ (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address-comments Created 5 years, 1 month 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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "bin/builtin.h" 5 #include "bin/builtin.h"
6 #include "include/dart_api.h" 6 #include "include/dart_api.h"
7 #include "include/dart_mirrors_api.h" 7 #include "include/dart_mirrors_api.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "include/dart_tools_api.h" 9 #include "include/dart_tools_api.h"
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 7820 matching lines...) Expand 10 before | Expand all | Expand 10 after
7831 ASSERT(interrupt_count < kInterruptCount); 7831 ASSERT(interrupt_count < kInterruptCount);
7832 return true; 7832 return true;
7833 } 7833 }
7834 7834
7835 7835
7836 TEST_CASE(IsolateInterrupt) { 7836 TEST_CASE(IsolateInterrupt) {
7837 Dart_IsolateInterruptCallback saved = Isolate::InterruptCallback(); 7837 Dart_IsolateInterruptCallback saved = Isolate::InterruptCallback();
7838 Isolate::SetInterruptCallback(IsolateInterruptTestCallback); 7838 Isolate::SetInterruptCallback(IsolateInterruptTestCallback);
7839 7839
7840 sync = new Monitor(); 7840 sync = new Monitor();
7841 int result = OSThread::Start(BusyLoop_start, 0); 7841 int result = OSThread::Start("IsolateInterrupt", BusyLoop_start, 0);
7842 EXPECT_EQ(0, result); 7842 EXPECT_EQ(0, result);
7843 7843
7844 { 7844 {
7845 MonitorLocker ml(sync); 7845 MonitorLocker ml(sync);
7846 // Wait for the other isolate to enter main. 7846 // Wait for the other isolate to enter main.
7847 while (!main_entered) { 7847 while (!main_entered) {
7848 ml.Wait(); 7848 ml.Wait();
7849 } 7849 }
7850 } 7850 }
7851 7851
(...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after
9843 9843
9844 // Heartbeat test for new events. 9844 // Heartbeat test for new events.
9845 EXPECT_SUBSTRING("\"name\":\"TestVMDuration2\"", buffer); 9845 EXPECT_SUBSTRING("\"name\":\"TestVMDuration2\"", buffer);
9846 EXPECT_SUBSTRING("\"function\":\"::_bar\"", buffer); 9846 EXPECT_SUBSTRING("\"function\":\"::_bar\"", buffer);
9847 9847
9848 // Free buffer allocated by AppendStreamConsumer 9848 // Free buffer allocated by AppendStreamConsumer
9849 free(data.buffer); 9849 free(data.buffer);
9850 } 9850 }
9851 9851
9852 } // namespace dart 9852 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/dart_entry.cc » ('j') | runtime/vm/dart_entry.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698