Bug 33566

Summary: [BREWMP] Port WTF's randomNumber
Product: WebKit Reporter: Kwang Yul Seo <skyul>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Other   
Bug Depends on:    
Bug Blocks: 33564    
Attachments:
Description Flags
Port randomNumber and weakRandomNumber to BREW
none
Port randomNumber and weakRandomNumber
eric: review-
Port randomNumber and weakRandomNumber
eric: review+, eric: commit-queue-
Port randomNumber and weakRandomNumber none

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.