Last Comment Bug 738759 - Add nsContentUtils::CheckSameOrigin overload taking two nsINodes
: Add nsContentUtils::CheckSameOrigin overload taking two nsINodes
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla14
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-23 12:48 PDT by :Ms2ger (⌚ UTC+1/+2)
Modified: 2012-04-03 02:02 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (10.58 KB, patch)
2012-03-23 12:48 PDT, :Ms2ger (⌚ UTC+1/+2)
jst: review+
Details | Diff | Splinter Review

Description :Ms2ger (⌚ UTC+1/+2) 2012-03-23 12:48:25 PDT
Created attachment 608828 [details] [diff] [review]
Patch v1

Quite a few callers want an nsINode anyway.
Comment 1 Johnny Stenback (:jst, jst@mozilla.com) 2012-03-30 21:12:45 PDT
Comment on attachment 608828 [details] [diff] [review]
Patch v1

-    case nsIDOMNode::ENTITY_NODE:
-    case nsIDOMNode::ENTITY_REFERENCE_NODE:
-    case nsIDOMNode::NOTATION_NODE:
-    {
-      return NS_ERROR_NOT_IMPLEMENTED;
-    }
     default:
     {
       NS_WARNING("Don't know how to clone this nodetype for importNode.");
 
       return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
     }

This is of course an observable change in behavior here. Correct as it is, we should keep an eye out for odd fallout from this.

r=jst
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2012-04-01 06:12:13 PDT
(In reply to Johnny Stenback (:jst, jst@mozilla.com) from comment #1)
> Comment on attachment 608828 [details] [diff] [review]
> Patch v1
> 
> -    case nsIDOMNode::ENTITY_NODE:
> -    case nsIDOMNode::ENTITY_REFERENCE_NODE:
> -    case nsIDOMNode::NOTATION_NODE:
> -    {
> -      return NS_ERROR_NOT_IMPLEMENTED;
> -    }
>      default:
>      {
>        NS_WARNING("Don't know how to clone this nodetype for importNode.");
>  
>        return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
>      }
> 
> This is of course an observable change in behavior here. Correct as it is,
> we should keep an eye out for odd fallout from this.

How so? If it's an nsINode, it can't return any of these values through GetNodeType(). (At least, I sure hope so!) If it's not, we already threw from nsContentUtils::CheckSameOrigin(nsINode*, nsIDOMNode*).
Comment 3 :Ms2ger (⌚ UTC+1/+2) 2012-04-03 02:02:57 PDT
https://hg.mozilla.org/mozilla-central/rev/66101542ba09

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