Add nsContentUtils::CheckSameOrigin overload taking two nsINodes

RESOLVED FIXED in mozilla14

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

Trunk
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 608828 [details] [diff] [review]
Patch v1

Quite a few callers want an nsINode anyway.
Attachment #608828 - Flags: review?(jst)
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
Attachment #608828 - Flags: review?(jst) → review+
(Assignee)

Comment 2

5 years ago
(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*).
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/mozilla-central/rev/66101542ba09
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.