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

Side by Side Diff: src/objects-inl.h

Issue 759683004: ExecutableAccessorInfo::clear_setter should set a null foreign pointer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: need write barrier Created 6 years 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 | test/cctest/test-accessors.cc » ('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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 7004 matching lines...) Expand 10 before | Expand all | Expand 10 after
7015 7015
7016 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { 7016 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) {
7017 if (!HasExpectedReceiverType()) return true; 7017 if (!HasExpectedReceiverType()) return true;
7018 if (!receiver->IsJSObject()) return false; 7018 if (!receiver->IsJSObject()) return false;
7019 return FunctionTemplateInfo::cast(expected_receiver_type()) 7019 return FunctionTemplateInfo::cast(expected_receiver_type())
7020 ->IsTemplateFor(JSObject::cast(receiver)->map()); 7020 ->IsTemplateFor(JSObject::cast(receiver)->map());
7021 } 7021 }
7022 7022
7023 7023
7024 void ExecutableAccessorInfo::clear_setter() { 7024 void ExecutableAccessorInfo::clear_setter() {
7025 set_setter(GetIsolate()->heap()->undefined_value(), SKIP_WRITE_BARRIER); 7025 set_setter(*GetIsolate()->factory()->NewForeign(
7026 reinterpret_cast<v8::internal::Address>(
7027 reinterpret_cast<intptr_t>(nullptr))));
7026 } 7028 }
7027 7029
7028 7030
7029 template<typename Derived, typename Shape, typename Key> 7031 template<typename Derived, typename Shape, typename Key>
7030 void Dictionary<Derived, Shape, Key>::SetEntry(int entry, 7032 void Dictionary<Derived, Shape, Key>::SetEntry(int entry,
7031 Handle<Object> key, 7033 Handle<Object> key,
7032 Handle<Object> value) { 7034 Handle<Object> value) {
7033 SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0))); 7035 SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0)));
7034 } 7036 }
7035 7037
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
7503 #undef READ_SHORT_FIELD 7505 #undef READ_SHORT_FIELD
7504 #undef WRITE_SHORT_FIELD 7506 #undef WRITE_SHORT_FIELD
7505 #undef READ_BYTE_FIELD 7507 #undef READ_BYTE_FIELD
7506 #undef WRITE_BYTE_FIELD 7508 #undef WRITE_BYTE_FIELD
7507 #undef NOBARRIER_READ_BYTE_FIELD 7509 #undef NOBARRIER_READ_BYTE_FIELD
7508 #undef NOBARRIER_WRITE_BYTE_FIELD 7510 #undef NOBARRIER_WRITE_BYTE_FIELD
7509 7511
7510 } } // namespace v8::internal 7512 } } // namespace v8::internal
7511 7513
7512 #endif // V8_OBJECTS_INL_H_ 7514 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-accessors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698