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

Side by Side Diff: src/api.cc

Issue 2258003002: Disable CFI on a few methods. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | src/base/macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7998 matching lines...) Expand 10 before | Expand all | Expand 10 after
8009 } 8009 }
8010 8010
8011 8011
8012 class VisitorAdapter : public i::ObjectVisitor { 8012 class VisitorAdapter : public i::ObjectVisitor {
8013 public: 8013 public:
8014 explicit VisitorAdapter(PersistentHandleVisitor* visitor) 8014 explicit VisitorAdapter(PersistentHandleVisitor* visitor)
8015 : visitor_(visitor) {} 8015 : visitor_(visitor) {}
8016 void VisitPointers(i::Object** start, i::Object** end) override { 8016 void VisitPointers(i::Object** start, i::Object** end) override {
8017 UNREACHABLE(); 8017 UNREACHABLE();
8018 } 8018 }
8019 DISABLE_CFI_PERF
8019 void VisitEmbedderReference(i::Object** p, uint16_t class_id) override { 8020 void VisitEmbedderReference(i::Object** p, uint16_t class_id) override {
8020 Value* value = ToApi<Value>(i::Handle<i::Object>(p)); 8021 Value* value = ToApi<Value>(i::Handle<i::Object>(p));
8021 visitor_->VisitPersistentHandle( 8022 visitor_->VisitPersistentHandle(
8022 reinterpret_cast<Persistent<Value>*>(&value), class_id); 8023 reinterpret_cast<Persistent<Value>*>(&value), class_id);
8023 } 8024 }
8024 8025
8025 private: 8026 private:
8026 PersistentHandleVisitor* visitor_; 8027 PersistentHandleVisitor* visitor_;
8027 }; 8028 };
8028 8029
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
9017 Address callback_address = 9018 Address callback_address =
9018 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9019 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9019 VMState<EXTERNAL> state(isolate); 9020 VMState<EXTERNAL> state(isolate);
9020 ExternalCallbackScope call_scope(isolate, callback_address); 9021 ExternalCallbackScope call_scope(isolate, callback_address);
9021 callback(info); 9022 callback(info);
9022 } 9023 }
9023 9024
9024 9025
9025 } // namespace internal 9026 } // namespace internal
9026 } // namespace v8 9027 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/base/macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698