chore: DCHECK for correct thread in EventEmitter::EmitWithSender (#19959)

This commit is contained in:
Jeremy Apthorp 2019-08-27 15:15:52 -07:00 committed by GitHub
parent bdc84d0bfb
commit 1dcda7b809
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,6 +85,7 @@ class EventEmitter : public Wrappable<T> {
base::Optional<electron::mojom::ElectronBrowser::MessageSyncCallback>
callback,
Args&&... args) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
v8::Local<v8::Object> wrapper = GetWrapper();