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

Side by Side Diff: Source/bindings/modules/v8/custom/V8CryptoCustom.cpp

Issue 537403002: bindings: Renames from/toInternalPointer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 30 matching lines...) Expand all
41 if (info.Length() < 1) { 41 if (info.Length() < 1) {
42 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 42 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
43 exceptionState.throwIfNeeded(); 43 exceptionState.throwIfNeeded();
44 return; 44 return;
45 } 45 }
46 46
47 v8::Handle<v8::Value> buffer = info[0]; 47 v8::Handle<v8::Value> buffer = info[0];
48 if (!V8ArrayBufferView::hasInstance(buffer, info.GetIsolate())) { 48 if (!V8ArrayBufferView::hasInstance(buffer, info.GetIsolate())) {
49 exceptionState.throwTypeError("First argument is not an ArrayBufferView" ); 49 exceptionState.throwTypeError("First argument is not an ArrayBufferView" );
50 } else { 50 } else {
51 ArrayBufferView* arrayBufferView = V8ArrayBufferView::toNative(v8::Handl e<v8::Object>::Cast(buffer)); 51 ArrayBufferView* arrayBufferView = V8ArrayBufferView::toImpl(v8::Handle< v8::Object>::Cast(buffer));
52 ASSERT(arrayBufferView); 52 ASSERT(arrayBufferView);
53 53
54 Crypto* crypto = V8Crypto::toNative(info.Holder()); 54 Crypto* crypto = V8Crypto::toImpl(info.Holder());
55 crypto->getRandomValues(arrayBufferView, exceptionState); 55 crypto->getRandomValues(arrayBufferView, exceptionState);
56 } 56 }
57 57
58 if (exceptionState.throwIfNeeded()) 58 if (exceptionState.throwIfNeeded())
59 return; 59 return;
60 60
61 v8SetReturnValue(info, buffer); 61 v8SetReturnValue(info, buffer);
62 } 62 }
63 63
64 } // namespace blink 64 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/modules/v8/IDBBindingUtilities.cpp ('k') | Source/bindings/modules/v8/custom/V8CryptoKeyCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698