WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
65157
Simplify createCanonicalUUIDString implementation.
https://bugs.webkit.org/show_bug.cgi?id=65157
Summary
Simplify createCanonicalUUIDString implementation.
Justin Schuh
Reported
2011-07-25 17:44:47 PDT
COM calls are not allowed in the Chromium sandbox. Patch forthcoming.
Attachments
Patch
(4.65 KB, patch)
2011-07-26 14:49 PDT
,
Justin Schuh
no flags
Details
Formatted Diff
Diff
Patch
(4.32 KB, patch)
2011-07-28 14:15 PDT
,
Justin Schuh
no flags
Details
Formatted Diff
Diff
Patch
(4.32 KB, patch)
2011-07-28 14:21 PDT
,
Justin Schuh
abarth
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Justin Schuh
Comment 1
2011-07-26 14:49:28 PDT
Created
attachment 102057
[details]
Patch
Michael Nordman
Comment 2
2011-07-26 15:59:04 PDT
Comment on
attachment 102057
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=102057&action=review
> Source/WebCore/platform/UUID.cpp:64 > +#elif (PLATFORM(CHROMIUM) || OS(DARWIN)) && !USE(CF)
Is there a reason not to use this UUID generator in all CHROMIUM cases? Just curious.
> Source/WebCore/platform/UUID.cpp:82 > + builder.append("\n");
I'm surprised to see the trailing newline here. Do the other impls result in strings with a trailing newline?
> Source/WebCore/platform/UUID.cpp:115 > ASSERT(canonicalUuidStr[uuidVersionIdentifierIndex] == uuidVersionRequired);
All of the other impls make this assertion... ASSERT(canonicalUuidStr[uuidVersionIdentifierIndex] == uuidVersionRequired); Does this difference matter?
Justin Schuh
Comment 3
2011-07-26 17:10:08 PDT
Comment on
attachment 102057
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=102057&action=review
>> Source/WebCore/platform/UUID.cpp:64 >> +#elif (PLATFORM(CHROMIUM) || OS(DARWIN)) && !USE(CF) > > Is there a reason not to use this UUID generator in all CHROMIUM cases? Just curious.
I'm not sure and couldn't get a firm answer, so I chose to leave Mac Chrome the way it is.
>> Source/WebCore/platform/UUID.cpp:82 >> + builder.append("\n"); > > I'm surprised to see the trailing newline here. Do the other impls result in strings with a trailing newline?
Good catch. I assume that's for compatibility with /proc/sys/kernel/random/uuid (which has a newline). It's not an issue because the UUID gets encoded; however I can macro around that to keep the Windows version consistent.
>> Source/WebCore/platform/UUID.cpp:115 >> ASSERT(canonicalUuidStr[uuidVersionIdentifierIndex] == uuidVersionRequired); > > All of the other impls make this assertion... > ASSERT(canonicalUuidStr[uuidVersionIdentifierIndex] == uuidVersionRequired); > Does this difference matter?
The code that manually generates the UUID explicitly sets this field, so there's no need to check for it.
Justin Schuh
Comment 4
2011-07-28 14:15:59 PDT
Created
attachment 102297
[details]
Patch I talked to Adam and he said all the listed ports support OS_RANDOMNESS. So, he suggested just switching all of them over to a single implementation. (Also, I verified the newline was pointless, and actually clipped in the Linux implementation.)
Justin Schuh
Comment 5
2011-07-28 14:21:52 PDT
Created
attachment 102298
[details]
Patch Should probably use a different title and changelog entry now.
Adam Barth
Comment 6
2011-07-28 15:43:07 PDT
Comment on
attachment 102298
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=102298&action=review
I've added some folks to the CC line to make sure they see this patch go by. I can't think of any reason not to use the cryptographically random implementation now that we have it.
> Source/WebCore/platform/UUID.cpp:45 > + WTF::cryptographicallyRandomValues(reinterpret_cast<unsigned char*>(randomData), sizeof(randomData));
The WTF:: part isn't needed.
Justin Schuh
Comment 7
2011-07-28 17:24:26 PDT
Committed
r91963
: <
http://trac.webkit.org/changeset/91963
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug