Title: [132835] branches/chromium/1271/Source/WebCore/inspector/InspectorStyleSheet.cpp
Revision
132835
Author
[email protected]
Date
2012-10-29 12:01:41 -0700 (Mon, 29 Oct 2012)

Log Message

Merge 132462
BUG=157778
Review URL: https://codereview.chromium.org/11348012

Modified Paths

Diff

Modified: branches/chromium/1271/Source/WebCore/inspector/InspectorStyleSheet.cpp (132834 => 132835)


--- branches/chromium/1271/Source/WebCore/inspector/InspectorStyleSheet.cpp	2012-10-29 19:00:41 UTC (rev 132834)
+++ branches/chromium/1271/Source/WebCore/inspector/InspectorStyleSheet.cpp	2012-10-29 19:01:41 UTC (rev 132835)
@@ -844,16 +844,18 @@
         return false;
     }
 
-    styleSheet->deleteRule(id.ordinal(), ec);
-    if (ec)
-        return false;
-
     RefPtr<CSSRuleSourceData> sourceData = ruleSourceDataFor(rule->style());
     if (!sourceData) {
         ec = NOT_FOUND_ERR;
         return false;
     }
 
+    styleSheet->deleteRule(id.ordinal(), ec);
+    // |rule| MAY NOT be addressed after this line!
+
+    if (ec)
+        return false;
+
     String sheetText = m_parsedStyleSheet->text();
     sheetText.remove(sourceData->ruleHeaderRange.start, sourceData->ruleBodyRange.end - sourceData->ruleHeaderRange.start + 1);
     m_parsedStyleSheet->setText(sheetText);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to