Bug 656183: remove duplicate call to SetCanvasElement. r=joe
authorBenjamin Peterson <benjamin@python.org>
Wed, 18 May 2011 21:23:00 -0400
changeset 69708 5f9f7a49e2e1876c21642b911adc22b1a63e21b4
parent 69707 49eaed73c95dc749f93472783397e4cecf836988
child 69709 099889dac1e996cc801a5d5d0f170f81c2620db1
push idunknown
push userunknown
push dateunknown
reviewersjoe
bugs656183
milestone6.0a1
Bug 656183: remove duplicate call to SetCanvasElement. r=joe
content/html/content/src/nsHTMLCanvasElement.cpp
--- a/content/html/content/src/nsHTMLCanvasElement.cpp
+++ b/content/html/content/src/nsHTMLCanvasElement.cpp
@@ -468,22 +468,16 @@ nsHTMLCanvasElement::GetContext(const ns
     // CC participant from QI doesn't addref.
     nsXPCOMCycleCollectionParticipant *cp = nsnull;
     CallQueryInterface(mCurrentContext, &cp);
     if (!cp) {
       mCurrentContext = nsnull;
       return NS_ERROR_FAILURE;
     }
 
-    rv = mCurrentContext->SetCanvasElement(this);
-    if (NS_FAILED(rv)) {
-      mCurrentContext = nsnull;
-      return rv;
-    }
-
     nsCOMPtr<nsIPropertyBag> contextProps;
     if (!JSVAL_IS_NULL(aContextOptions) &&
         !JSVAL_IS_VOID(aContextOptions))
     {
       JSContext *cx = nsContentUtils::GetCurrentJSContext();
 
       nsCOMPtr<nsIWritablePropertyBag2> newProps;