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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptPromisePropertyBase.cpp

Issue 2800393003: This CL is a workaround fix for a crash issue; to set "undefined" instead of deleting properties. (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium 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 "bindings/core/v8/ScriptPromisePropertyBase.h" 5 #include "bindings/core/v8/ScriptPromisePropertyBase.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "bindings/core/v8/ScopedPersistent.h" 8 #include "bindings/core/v8/ScopedPersistent.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "bindings/core/v8/V8Binding.h" 10 #include "bindings/core/v8/V8Binding.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 155
156 void ScriptPromisePropertyBase::ClearWrappers() { 156 void ScriptPromisePropertyBase::ClearWrappers() {
157 CheckThis(); 157 CheckThis();
158 CheckWrappers(); 158 CheckWrappers();
159 v8::HandleScope handle_scope(isolate_); 159 v8::HandleScope handle_scope(isolate_);
160 for (WeakPersistentSet::iterator i = wrappers_.begin(); i != wrappers_.end(); 160 for (WeakPersistentSet::iterator i = wrappers_.begin(); i != wrappers_.end();
161 ++i) { 161 ++i) {
162 v8::Local<v8::Object> wrapper = (*i)->NewLocal(isolate_); 162 v8::Local<v8::Object> wrapper = (*i)->NewLocal(isolate_);
163 if (!wrapper.IsEmpty()) { 163 if (!wrapper.IsEmpty()) {
164 ResolverSymbol().DeleteProperty(wrapper);
165 // TODO(peria): Use deleteProperty() if http://crbug.com/v8/6227 is fixed. 164 // TODO(peria): Use deleteProperty() if http://crbug.com/v8/6227 is fixed.
165 ResolverSymbol().Set(wrapper, v8::Undefined(isolate_));
166 PromiseSymbol().Set(wrapper, v8::Undefined(isolate_)); 166 PromiseSymbol().Set(wrapper, v8::Undefined(isolate_));
167 } 167 }
168 } 168 }
169 wrappers_.Clear(); 169 wrappers_.Clear();
170 } 170 }
171 171
172 void ScriptPromisePropertyBase::CheckThis() { 172 void ScriptPromisePropertyBase::CheckThis() {
173 RELEASE_ASSERT(this); 173 RELEASE_ASSERT(this);
174 } 174 }
175 175
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 NOTREACHED(); 209 NOTREACHED();
210 return V8PrivateProperty::GetSymbol(isolate_, "noResolver"); 210 return V8PrivateProperty::GetSymbol(isolate_, "noResolver");
211 } 211 }
212 212
213 DEFINE_TRACE(ScriptPromisePropertyBase) { 213 DEFINE_TRACE(ScriptPromisePropertyBase) {
214 ContextClient::Trace(visitor); 214 ContextClient::Trace(visitor);
215 } 215 }
216 216
217 } // namespace blink 217 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698