1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
From 5da8e2ffd63deac27c0faca7dabee3623867dd6e Mon Sep 17 00:00:00 2001
From: Steven Michaud <smichaud@pobox.com>
Date: Wed, 3 Jun 2015 11:18:25 -0500
Subject: [PATCH] Bug 1154876 - Block calls to hooked methods off the plugin
thread. r=spohl a=abillings
---
dom/plugins/ipc/PluginInterposeOSX.mm | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/dom/plugins/ipc/PluginInterposeOSX.mm b/dom/plugins/ipc/PluginInterposeOSX.mm
index f43192b..cfd8e57 100644
--- a/dom/plugins/ipc/PluginInterposeOSX.mm
+++ b/dom/plugins/ipc/PluginInterposeOSX.mm
@@ -38,8 +38,7 @@
#import <objc/runtime.h>
#import <Carbon/Carbon.h>
-using mozilla::plugins::PluginModuleChild;
-using mozilla::plugins::AssertPluginThread;
+using namespace mozilla::plugins;
namespace mac_plugin_interposing {
@@ -544,7 +543,7 @@ void NSCursorInfo::SetCustomImageData(uint8_t* aData, uint32_t aDataLength)
bool NSCursorInfo::GetNativeCursorsSupported()
{
if (mNativeCursorsSupported == -1) {
- AssertPluginThread();
+ ENSURE_PLUGIN_THREAD(false);
PluginModuleChild *pmc = PluginModuleChild::current();
if (pmc) {
bool result = pmc->GetNativeCursorsSupported();
@@ -689,7 +688,7 @@ void FocusPluginProcess() {
void NotifyBrowserOfPluginShowWindow(uint32_t window_id, CGRect bounds,
bool modal) {
- AssertPluginThread();
+ ENSURE_PLUGIN_THREAD_VOID();
PluginModuleChild *pmc = PluginModuleChild::current();
if (pmc)
@@ -697,7 +696,7 @@ void NotifyBrowserOfPluginShowWindow(uint32_t window_id, CGRect bounds,
}
void NotifyBrowserOfPluginHideWindow(uint32_t window_id, CGRect bounds) {
- AssertPluginThread();
+ ENSURE_PLUGIN_THREAD_VOID();
PluginModuleChild *pmc = PluginModuleChild::current();
if (pmc)
@@ -706,7 +705,7 @@ void NotifyBrowserOfPluginHideWindow(uint32_t window_id, CGRect bounds) {
void NotifyBrowserOfSetCursor(NSCursorInfo& aCursorInfo)
{
- AssertPluginThread();
+ ENSURE_PLUGIN_THREAD_VOID();
PluginModuleChild *pmc = PluginModuleChild::current();
if (pmc) {
pmc->SetCursor(aCursorInfo);
@@ -715,7 +714,7 @@ void NotifyBrowserOfSetCursor(NSCursorInfo& aCursorInfo)
void NotifyBrowserOfShowCursor(bool show)
{
- AssertPluginThread();
+ ENSURE_PLUGIN_THREAD_VOID();
PluginModuleChild *pmc = PluginModuleChild::current();
if (pmc) {
pmc->ShowCursor(show);
@@ -724,7 +723,7 @@ void NotifyBrowserOfShowCursor(bool show)
void NotifyBrowserOfPushCursor(NSCursorInfo& aCursorInfo)
{
- AssertPluginThread();
+ ENSURE_PLUGIN_THREAD_VOID();
PluginModuleChild *pmc = PluginModuleChild::current();
if (pmc) {
pmc->PushCursor(aCursorInfo);
@@ -733,7 +732,7 @@ void NotifyBrowserOfPushCursor(NSCursorInfo& aCursorInfo)
void NotifyBrowserOfPopCursor()
{
- AssertPluginThread();
+ ENSURE_PLUGIN_THREAD_VOID();
PluginModuleChild *pmc = PluginModuleChild::current();
if (pmc) {
pmc->PopCursor();
--
2.4.3
|