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

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 7763 matching lines...) Expand 10 before | Expand all | Expand 10 after
7774 options); 7774 options);
7775 } 7775 }
7776 7776
7777 7777
7778 void Isolate::VisitExternalResources(ExternalResourceVisitor* visitor) { 7778 void Isolate::VisitExternalResources(ExternalResourceVisitor* visitor) {
7779 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 7779 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7780 isolate->heap()->VisitExternalResources(visitor); 7780 isolate->heap()->VisitExternalResources(visitor);
7781 } 7781 }
7782 7782
7783 7783
7784 bool Isolate::IsInUse() {
7785 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7786 return isolate->IsInUse();
7787 }
7788
7789
7784 class VisitorAdapter : public i::ObjectVisitor { 7790 class VisitorAdapter : public i::ObjectVisitor {
7785 public: 7791 public:
7786 explicit VisitorAdapter(PersistentHandleVisitor* visitor) 7792 explicit VisitorAdapter(PersistentHandleVisitor* visitor)
7787 : visitor_(visitor) {} 7793 : visitor_(visitor) {}
7788 void VisitPointers(i::Object** start, i::Object** end) override { 7794 void VisitPointers(i::Object** start, i::Object** end) override {
7789 UNREACHABLE(); 7795 UNREACHABLE();
7790 } 7796 }
7791 void VisitEmbedderReference(i::Object** p, uint16_t class_id) override { 7797 void VisitEmbedderReference(i::Object** p, uint16_t class_id) override {
7792 Value* value = ToApi<Value>(i::Handle<i::Object>(p)); 7798 Value* value = ToApi<Value>(i::Handle<i::Object>(p));
7793 visitor_->VisitPersistentHandle( 7799 visitor_->VisitPersistentHandle(
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
8798 Address callback_address = 8804 Address callback_address =
8799 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8805 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8800 VMState<EXTERNAL> state(isolate); 8806 VMState<EXTERNAL> state(isolate);
8801 ExternalCallbackScope call_scope(isolate, callback_address); 8807 ExternalCallbackScope call_scope(isolate, callback_address);
8802 callback(info); 8808 callback(info);
8803 } 8809 }
8804 8810
8805 8811
8806 } // namespace internal 8812 } // namespace internal
8807 } // namespace v8 8813 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/isolate.cc » ('j') | src/libsampler/hashmap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698