diff --git a/content/html/content/src/nsHTMLCanvasElement.cpp b/content/html/content/src/nsHTMLCanvasElement.cpp
index b435ed7cddbb..de26eaf3e3b5 100644
--- a/content/html/content/src/nsHTMLCanvasElement.cpp
+++ b/content/html/content/src/nsHTMLCanvasElement.cpp
@@ -473,12 +473,6 @@ nsHTMLCanvasElement::GetContext(const nsAString& aContextId,
return NS_ERROR_FAILURE;
}
- rv = mCurrentContext->SetCanvasElement(this);
- if (NS_FAILED(rv)) {
- mCurrentContext = nsnull;
- return rv;
- }
-
nsCOMPtr contextProps;
if (!JSVAL_IS_NULL(aContextOptions) &&
!JSVAL_IS_VOID(aContextOptions))