Last Comment Bug 779384 - B2G Bluetooth: Hook up to permissions manager
: B2G Bluetooth: Hook up to permissions manager
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla17
Assigned To: Kyle Machulis [:kmachulis] [:qdot]
:
Mentors:
Depends on:
Blocks: 774716 b2g-bluetooth 764618
  Show dependency treegraph
 
Reported: 2012-07-31 18:25 PDT by Kyle Machulis [:kmachulis] [:qdot]
Modified: 2012-08-08 09:29 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+


Attachments
Patch 1: Hook bluetooth up to permissions manager (2.33 KB, patch)
2012-08-07 16:49 PDT, Kyle Machulis [:kmachulis] [:qdot]
mrbkap: review+
Details | Diff | Review

Description Kyle Machulis [:kmachulis] [:qdot] 2012-07-31 18:25:26 PDT
Remove the URI based permissions check and move to using the PermissionsManager for checks. 

https://mxr.mozilla.org/mozilla-central/source/content/base/src/nsContentUtils.cpp#6834
Comment 1 Kyle Machulis [:kmachulis] [:qdot] 2012-08-07 16:49:15 PDT
Created attachment 649882 [details] [diff] [review]
Patch 1: Hook bluetooth up to permissions manager
Comment 2 Blake Kaplan (:mrbkap) (please use needinfo!) 2012-08-07 17:51:03 PDT
Comment on attachment 649882 [details] [diff] [review]
Patch 1: Hook bluetooth up to permissions manager

Review of attachment 649882 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/bluetooth/BluetoothManager.cpp
@@ +278,5 @@
> +    aWindow->GetCurrentInnerWindow();
> +
> +  // Need the document for security check.
> +  nsCOMPtr<nsIDocument> document =
> +    do_QueryInterface(innerWindow->GetExtantDocument());

You can avoid a do_QueryInterface by using innerWindow->GetExtantDoc() instead here.
Comment 3 Kyle Machulis [:kmachulis] [:qdot] 2012-08-07 21:11:43 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/8f7045786fbf
Comment 4 Ed Morley [:emorley] 2012-08-08 09:29:23 PDT
https://hg.mozilla.org/mozilla-central/rev/8f7045786fbf

Note You need to log in before you can comment on or make changes to this bug.