Last Comment Bug 760049 - Move nsIScriptContext::CreateNativeGlobalForInner to nsGlobalWindow.cpp
: Move nsIScriptContext::CreateNativeGlobalForInner to nsGlobalWindow.cpp
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla16
Assigned To: :Ms2ger (⌚ UTC+1/+2)
: Andrew Overholt [:overholt]
Depends on:
  Show dependency treegraph
Reported: 2012-05-31 03:54 PDT by :Ms2ger (⌚ UTC+1/+2)
Modified: 2012-06-06 03:27 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1 (8.81 KB, patch)
2012-05-31 03:54 PDT, :Ms2ger (⌚ UTC+1/+2)
jst: review+
Details | Diff | Splinter Review

Description User image :Ms2ger (⌚ UTC+1/+2) 2012-05-31 03:54:24 PDT
Created attachment 628669 [details] [diff] [review]
Patch v1

nsGlobalWindow::SetNewDocument is the only caller, so I think it's clearer to just put move it there.
Comment 1 User image Johnny Stenback (:jst, 2012-05-31 08:49:44 PDT
Comment on attachment 628669 [details] [diff] [review]
Patch v1

- In dom/base/nsIScriptContext.h:

-  virtual nsresult CreateNativeGlobalForInner(
-                                      nsIScriptGlobalObject *aNewInner,
-                                      nsIURI *aURI,

This changes the vtable layout, which means you need to bump the IID here. And to be on the safe side I'd bump the IID on nsIScriptGlobalObject as well, as I believe that's on the the most common path for getting your hands on an nsIScriptContext, and it's rare for code to QI anything to an nsIScriptContext so bumping the IID in this interface only buys us so much.
Comment 2 User image :Ms2ger (⌚ UTC+1/+2) 2012-06-06 03:27:07 PDT

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