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

Issue 2680933005: Make static KURLs thread safe

Created:
3 years, 10 months ago by Charlie Harrison
Modified:
3 years, 8 months ago
Reviewers:
dglazkov
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, kinuko+watch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make static KURLs thread safe KURLs aren't really thread safe, because they are generally mutable. Additionally, unless their String members are static strings (they aren't), then KURLs are *really* not thread safe. This CL makes sure that blankUrl() is only used on the main thread, and removes srcdocUrl() because it is used very infrequently. To help DomURL which wants about blank URLs off the main thread, I added a char kAboutBlankUrl[] for use in the KURL constructor. BUG=689044

Patch Set 1 #

Patch Set 2 : :/ #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -16 lines) Patch
M third_party/WebKit/Source/core/dom/DOMURL.h View 1 chunk +2 lines, -1 line 2 comments Download
M third_party/WebKit/Source/core/dom/DOMURL.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLImageElement.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLImageElement.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLVideoElement.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasImageSource.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/weborigin/KURL.h View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/weborigin/KURL.cpp View 2 chunks +6 lines, -8 lines 0 comments Download

Messages

Total messages: 19 (14 generated)
Charlie Harrison
esprehn: PTAL? As far as I can tell, this does make things slower, but not ...
3 years, 10 months ago (2017-02-09 15:56:27 UTC) #12
esprehn
Why aren't the KURLs constant? a const KURL& should be logically immutable just like a ...
3 years, 10 months ago (2017-02-15 02:05:17 UTC) #14
Charlie Harrison
Oh yeah I think a const KURL& is constant, but will hold reference to an ...
3 years, 10 months ago (2017-02-15 02:44:03 UTC) #15
esprehn
I see, we should make the static KURLs all be constructed with static StringImpl instances ...
3 years, 10 months ago (2017-02-16 05:51:49 UTC) #16
Charlie Harrison
3 years, 10 months ago (2017-02-16 12:56:18 UTC) #17
On 2017/02/16 05:51:49, esprehn wrote:
> I see, we should make the static KURLs all be constructed with static
StringImpl
> instances too, that solves this.

Ok. Before I considered that solution not worth the complexity, but I can
re-think if you prefer it.

Powered by Google App Engine
This is Rietveld 408576698