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

Side by Side Diff: src/api.cc

Issue 1922303002: Create libsampler as V8 sampler library. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project 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 "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 7764 matching lines...) Expand 10 before | Expand all | Expand 10 after
7775 options); 7775 options);
7776 } 7776 }
7777 7777
7778 7778
7779 void Isolate::VisitExternalResources(ExternalResourceVisitor* visitor) { 7779 void Isolate::VisitExternalResources(ExternalResourceVisitor* visitor) {
7780 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 7780 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7781 isolate->heap()->VisitExternalResources(visitor); 7781 isolate->heap()->VisitExternalResources(visitor);
7782 } 7782 }
7783 7783
7784 7784
7785 bool Isolate::IsInUse() {
7786 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7787 return isolate->IsInUse();
7788 }
7789
7790
7785 class VisitorAdapter : public i::ObjectVisitor { 7791 class VisitorAdapter : public i::ObjectVisitor {
7786 public: 7792 public:
7787 explicit VisitorAdapter(PersistentHandleVisitor* visitor) 7793 explicit VisitorAdapter(PersistentHandleVisitor* visitor)
7788 : visitor_(visitor) {} 7794 : visitor_(visitor) {}
7789 void VisitPointers(i::Object** start, i::Object** end) override { 7795 void VisitPointers(i::Object** start, i::Object** end) override {
7790 UNREACHABLE(); 7796 UNREACHABLE();
7791 } 7797 }
7792 void VisitEmbedderReference(i::Object** p, uint16_t class_id) override { 7798 void VisitEmbedderReference(i::Object** p, uint16_t class_id) override {
7793 Value* value = ToApi<Value>(i::Handle<i::Object>(p)); 7799 Value* value = ToApi<Value>(i::Handle<i::Object>(p));
7794 visitor_->VisitPersistentHandle( 7800 visitor_->VisitPersistentHandle(
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
8796 Address callback_address = 8802 Address callback_address =
8797 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8803 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8798 VMState<EXTERNAL> state(isolate); 8804 VMState<EXTERNAL> state(isolate);
8799 ExternalCallbackScope call_scope(isolate, callback_address); 8805 ExternalCallbackScope call_scope(isolate, callback_address);
8800 callback(info); 8806 callback(info);
8801 } 8807 }
8802 8808
8803 8809
8804 } // namespace internal 8810 } // namespace internal
8805 } // namespace v8 8811 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/libsampler/v8-sampler.h » ('j') | src/libsampler/v8-sampler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698