Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(830)

Unified Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 633073002: DevTools: PageAgent: do not use ScriptResource::script as it changes state. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorPageAgent.cpp
diff --git a/Source/core/inspector/InspectorPageAgent.cpp b/Source/core/inspector/InspectorPageAgent.cpp
index 9439d3f8d0eea5af660dadfd3d34629f4f119ccf..60f4899abc6e128bf02a297161f25ebbb33c8e05 100644
--- a/Source/core/inspector/InspectorPageAgent.cpp
+++ b/Source/core/inspector/InspectorPageAgent.cpp
@@ -279,7 +279,7 @@ bool InspectorPageAgent::cachedResourceContent(Resource* cachedResource, String*
*result = toCSSStyleSheetResource(cachedResource)->sheetText(false);
return true;
case Resource::Script:
- *result = toScriptResource(cachedResource)->script();
+ *result = cachedResource->resourceBuffer() ? toScriptResource(cachedResource)->decodedText() : toScriptResource(cachedResource)->script();
return true;
case Resource::Raw: {
SharedBuffer* buffer = cachedResource->resourceBuffer();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698