Bug 33566 - [BREWMP] Port WTF's randomNumber
Summary: [BREWMP] Port WTF's randomNumber
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 33564
  Show dependency treegraph
 
Reported: 2010-01-12 17:54 PST by Kwang Yul Seo
Modified: 2010-01-27 06:08 PST (History)
2 users (show)

See Also:


Attachments
Port randomNumber and weakRandomNumber to BREW (2.42 KB, patch)
2010-01-12 17:58 PST, Kwang Yul Seo
no flags Details | Formatted Diff | Diff
Port randomNumber and weakRandomNumber (2.42 KB, patch)
2010-01-22 18:04 PST, Kwang Yul Seo
eric: review-
Details | Formatted Diff | Diff
Port randomNumber and weakRandomNumber (2.39 KB, patch)
2010-01-26 16:14 PST, Kwang Yul Seo
eric: review+
eric: commit-queue-
Details | Formatted Diff | Diff
Port randomNumber and weakRandomNumber (2.39 KB, patch)
2010-01-26 16:58 PST, Kwang Yul Seo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kwang Yul Seo 2010-01-12 17:54:08 PST
1. Use GETRAND to generate 4 byte random byte sequence to implement weakRandomNumber.

2. Create a secure random number generator with AEECLSID_RANDOM to implement randomNumber.
Comment 1 Kwang Yul Seo 2010-01-12 17:58:39 PST
Created attachment 46417 [details]
Port randomNumber and weakRandomNumber to BREW
Comment 2 Kwang Yul Seo 2010-01-22 18:04:46 PST
Created attachment 47252 [details]
Port randomNumber and weakRandomNumber
Comment 3 Eric Seidel (no email) 2010-01-26 14:41:39 PST
Comment on attachment 47252 [details]
Port randomNumber and weakRandomNumber

Seems we should add the #undef to wtf/Assertions.h instead:

Something like what we do for windows:
#if OS(WINDOWS) || OS(SYMBIAN)
/* FIXME: Change to use something other than ASSERT to avoid this conflict with the underlying platform */
#undef ASSERT
#endif
Comment 4 Eric Seidel (no email) 2010-01-26 14:41:50 PST
Otherwise the patch looks sane enough.
Comment 5 Kwang Yul Seo 2010-01-26 16:14:42 PST
Created attachment 47458 [details]
Port randomNumber and weakRandomNumber 

Remove #undef COMPILE_ASSERT. I will file a bug for "#undef COMPILE_ASSERT".
Comment 6 Eric Seidel (no email) 2010-01-26 16:47:28 PST
Comment on attachment 47458 [details]
Port randomNumber and weakRandomNumber 

Looks fine.  Can't be cq+'d because it fails to apply.  Did you edit the diff manually?  That will commonly cause apply failures, as it's difficult to do correctly.  Easiest is to just generate a new diff using the tools.
Comment 7 Kwang Yul Seo 2010-01-26 16:58:00 PST
Created attachment 47463 [details]
Port randomNumber and weakRandomNumber

I generated a new diff with the tools.
Comment 8 Eric Seidel (no email) 2010-01-26 17:52:56 PST
Comment on attachment 47463 [details]
Port randomNumber and weakRandomNumber

Looks OK.
Comment 9 WebKit Commit Bot 2010-01-27 06:08:05 PST
Comment on attachment 47463 [details]
Port randomNumber and weakRandomNumber

Clearing flags on attachment: 47463

Committed r53928: <http://trac.webkit.org/changeset/53928>
Comment 10 WebKit Commit Bot 2010-01-27 06:08:11 PST
All reviewed patches have been landed.  Closing bug.