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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h

Issue 1389383003: WIP: Introduce CompressibleString Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto crrev.com/1564773002 Created 4 years, 11 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
Index: third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h b/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h
index 44efea1f2a4c887210736bf6c106e31482b6188a..fb9016cb5b5aad786fdd754b371401c64f38be64 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.h
@@ -53,18 +53,19 @@ public:
// Not sure if that matters.
explicit ScriptSourceCode(ScriptResource*);
ScriptSourceCode(const String&, const KURL& = KURL(), const TextPosition& startPosition = TextPosition::minimumPosition());
+ ScriptSourceCode(const CompressibleString&, const KURL& = KURL(), const TextPosition& startPosition = TextPosition::minimumPosition());
ScriptSourceCode(PassRefPtrWillBeRawPtr<ScriptStreamer>, ScriptResource*);
~ScriptSourceCode();
DECLARE_TRACE();
- bool isEmpty() const { return m_source.isEmpty(); }
+ bool isEmpty() const { return isNull() || m_source.isEmpty(); }
// The null value represents a missing script, created by the nullary
// constructor, and differs from the empty script.
bool isNull() const { return m_source.isNull(); }
- const String& source() const { return m_source; }
+ const CompressibleString& source() const { return m_source; }
ScriptResource* resource() const { return m_resource.get(); }
const KURL& url() const;
int startLine() const { return m_startPosition.m_line.oneBasedInt(); }
@@ -76,7 +77,7 @@ public:
private:
void treatNullSourceAsEmpty();
- String m_source;
+ CompressibleString m_source;
ResourcePtr<ScriptResource> m_resource;
RefPtrWillBeMember<ScriptStreamer> m_streamer;
mutable KURL m_url;

Powered by Google App Engine
This is Rietveld 408576698