unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
151,886 | 0 | void RenderFrameHostImpl::BindPresentationServiceRequest(
blink::mojom::PresentationServiceRequest request) {
if (!presentation_service_)
presentation_service_ = PresentationServiceImpl::Create(this);
presentation_service_->Bind(std::move(request));
}
| 15,000 |
3,019 | 0 | uint32_t vga_mem_readb(VGACommonState *s, hwaddr addr)
{
int memory_map_mode, plane;
uint32_t ret;
/* convert to VGA memory offset */
memory_map_mode = (s->gr[VGA_GFX_MISC] >> 2) & 3;
addr &= 0x1ffff;
switch(memory_map_mode) {
case 0:
break;
case 1:
if (addr >= 0x10000)
... | 15,001 |
128,709 | 0 | bool TemplateURL::HasSearchTermsReplacementKey(const GURL& url) const {
std::string params[] = {url.query(), url.ref()};
for (int i = 0; i < 2; ++i) {
url::Component query, key, value;
query.len = static_cast<int>(params[i].size());
while (url::ExtractQueryKeyValue(params[i].c_str(), &query, &key, &val... | 15,002 |
4,850 | 0 | IsMaster(DeviceIntPtr dev)
{
return dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD;
}
| 15,003 |
132,203 | 0 | media::CdmFactory* RenderFrameImpl::GetCdmFactory() {
#if defined(ENABLE_BROWSER_CDMS)
if (!cdm_manager_)
cdm_manager_ = new RendererCdmManager(this);
#endif // defined(ENABLE_BROWSER_CDMS)
if (!cdm_factory_) {
DCHECK(frame_);
#if defined(ENABLE_MOJO_MEDIA)
cdm_factory_.reset(new media::MojoCdmFactor... | 15,004 |
169,430 | 0 | int ChunkedUploadDataStream::ReadInternal(IOBuffer* buf, int buf_len) {
DCHECK_LT(0, buf_len);
DCHECK(!read_buffer_.get());
int result = ReadChunk(buf, buf_len);
if (result == ERR_IO_PENDING) {
read_buffer_ = buf;
read_buffer_len_ = buf_len;
}
return result;
}
| 15,005 |
174,298 | 0 | Camera3Device::PreparerThread::~PreparerThread() {
Thread::requestExitAndWait();
if (mCurrentStream != nullptr) {
mCurrentStream->cancelPrepare();
ATRACE_ASYNC_END("stream prepare", mCurrentStream->getId());
mCurrentStream.clear();
}
clear();
}
| 15,006 |
140,415 | 0 | PermissionRequestGestureType PermissionUtil::GetGestureType(bool user_gesture) {
return user_gesture ? PermissionRequestGestureType::GESTURE
: PermissionRequestGestureType::NO_GESTURE;
}
| 15,007 |
141,763 | 0 | void V8InjectedScriptHost::getInternalPropertiesCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
if (info.Length() < 1)
return;
v8::Local<v8::Array> properties;
if (unwrapInspector(info)->debugger()->internalProperties(info.GetIsolate()->GetCurrentContext(), info[0]).ToLocal(&properties))... | 15,008 |
147,317 | 0 | void V8TestObject::DOMTimeStampAttributeAttributeSetterCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_domTimeStampAttribute_Setter");
v8::Local<v8::Value> v8_value = info[0];
test_object_v8_internal::DOMTimeStamp... | 15,009 |
13,010 | 0 | sshpkt_get_ec(struct ssh *ssh, EC_POINT *v, const EC_GROUP *g)
{
return sshbuf_get_ec(ssh->state->incoming_packet, v, g);
}
| 15,010 |
13,292 | 0 | pdf14_cmap_gray_direct(frac gray, gx_device_color * pdc, const gs_gstate * pgs,
gx_device * dev, gs_color_select_t select)
{
int i,ncomps;
frac cm_comps[GX_DEVICE_COLOR_MAX_COMPONENTS];
gx_color_value cv[GX_DEVICE_COLOR_MAX_COMPONENTS];
gx_color_index color;
gx_device *trans_device;... | 15,011 |
67,551 | 0 | static void __ipxitf_put(struct ipx_interface *intrfc)
{
if (atomic_dec_and_test(&intrfc->refcnt))
__ipxitf_down(intrfc);
}
| 15,012 |
4,158 | 0 | ExponentialFunction::ExponentialFunction(const ExponentialFunction *func) : Function(func) {
memcpy(c0, func->c0, funcMaxOutputs * sizeof(double));
memcpy(c1, func->c1, funcMaxOutputs * sizeof(double));
e = func->e;
isLinear = func->isLinear;
ok = func->ok;
}
| 15,013 |
118,246 | 0 | AutofillDialogViews::DetailsGroup* AutofillDialogViews::GroupForView(
views::View* view) {
DCHECK(view);
views::View* input_view = GetAncestralInputView(view);
if (!input_view)
return NULL;
for (DetailGroupMap::iterator iter = detail_groups_.begin();
iter != detail_groups_.end(); ++iter) {
... | 15,014 |
185,982 | 1 | v8::Local<v8::Object> V8InjectedScriptHost::create(v8::Local<v8::Context> context, V8InspectorImpl* inspector)
{
v8::Isolate* isolate = inspector->isolate();
v8::Local<v8::Object> injectedScriptHost = v8::Object::New(isolate);
v8::Local<v8::External> debuggerExternal = v8::External::New(isolate, inspect... | 15,015 |
10,399 | 0 | FcDirCacheDisposeUnlocked (FcCache *cache)
{
FcCacheRemoveUnlocked (cache);
switch (cache->magic) {
case FC_CACHE_MAGIC_ALLOC:
free (cache);
break;
case FC_CACHE_MAGIC_MMAP:
#if defined(HAVE_MMAP) || defined(__CYGWIN__)
munmap (cache, cache->size);
#elif defined(_WIN32)
UnmapViewOfFile (cache);
#en... | 15,016 |
49,699 | 0 | static void *disk_seqf_start(struct seq_file *seqf, loff_t *pos)
{
loff_t skip = *pos;
struct class_dev_iter *iter;
struct device *dev;
iter = kmalloc(sizeof(*iter), GFP_KERNEL);
if (!iter)
return ERR_PTR(-ENOMEM);
seqf->private = iter;
class_dev_iter_init(iter, &block_class, NULL, &disk_type);
do {
dev =... | 15,017 |
59,094 | 0 | static void __mark_reg_unbounded(struct bpf_reg_state *reg)
{
reg->smin_value = S64_MIN;
reg->smax_value = S64_MAX;
reg->umin_value = 0;
reg->umax_value = U64_MAX;
}
| 15,018 |
101,337 | 0 | void SessionModelAssociator::InitializeCurrentSessionName() {
DCHECK(CalledOnValidThread());
if (setup_for_test_) {
OnSessionNameInitialized("TestSessionName");
} else {
#if defined(OS_CHROMEOS)
OnSessionNameInitialized("Chromebook");
#else
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
... | 15,019 |
129,871 | 0 | void ValidateAllTraceMacrosCreatedData(const ListValue& trace_parsed) {
const DictionaryValue* item = NULL;
#define EXPECT_FIND_(string) \
item = FindTraceEntry(trace_parsed, string); \
EXPECT_TRUE(item);
#define EXPECT_NOT_FIND_(string) \
item = FindTraceEntry(trace_parsed, string); \
EXPECT_FALSE(i... | 15,020 |
78,167 | 0 | static int asepcos_select_file(sc_card_t *card, const sc_path_t *in_path,
sc_file_t **file)
{
int r;
sc_path_t npath = *in_path;
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_NORMAL);
if (in_path->type == SC_PATH_TYPE_PATH) {
/* check the current DF to avoid unnecessary re-selection of
* the MF (as this migh... | 15,021 |
187,782 | 1 | void ih264d_init_decoder(void * ps_dec_params)
{
dec_struct_t * ps_dec = (dec_struct_t *)ps_dec_params;
dec_slice_params_t *ps_cur_slice;
pocstruct_t *ps_prev_poc, *ps_cur_poc;
WORD32 size;
size = sizeof(pred_info_t) * 2 * 32;
memset(ps_dec->ps_pred, 0 , size);
size = sizeof(disp_mgr_t);
memset... | 15,022 |
187,404 | 1 | static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
const uint8_t *data,
unsigned int data_sz,
void *user_priv,
long deadline)
{
vpx_codec_err_t res = VPX_CODEC_OK;
unsigned int resolution_change = 0;
unsigned int w, h;
if (!ctx->fragments.enabled && (data == NULL && data... | 15,023 |
29,841 | 0 | cifs_umount(struct cifs_sb_info *cifs_sb)
{
struct rb_root *root = &cifs_sb->tlink_tree;
struct rb_node *node;
struct tcon_link *tlink;
cancel_delayed_work_sync(&cifs_sb->prune_tlinks);
spin_lock(&cifs_sb->tlink_tree_lock);
while ((node = rb_first(root))) {
tlink = rb_entry(node, struct tcon_link, tl_rbnode);... | 15,024 |
89,285 | 0 | void qrio_set_leds(void)
{
u8 ctrlh;
void __iomem *qrio_base = (void *)CONFIG_SYS_QRIO_BASE;
/* set UNIT LED to RED and BOOT LED to ON */
ctrlh = in_8(qrio_base + CTRLH_OFF);
ctrlh |= (CTRLH_WRL_BOOT | CTRLH_WRL_UNITRUN);
out_8(qrio_base + CTRLH_OFF, ctrlh);
}
| 15,025 |
55,968 | 0 | static int skcipher_recvmsg_async(struct socket *sock, struct msghdr *msg,
int flags)
{
struct sock *sk = sock->sk;
struct alg_sock *ask = alg_sk(sk);
struct skcipher_ctx *ctx = ask->private;
struct skcipher_sg_list *sgl;
struct scatterlist *sg;
struct skcipher_async_req *sreq;
struct skcipher_request *req... | 15,026 |
110,968 | 0 | gfx::Rect RootWindowHostWin::GetBounds() const {
RECT r;
GetClientRect(hwnd(), &r);
return gfx::Rect(r);
}
| 15,027 |
70,552 | 0 | static void init_once(void *foo)
{
struct ext4_inode_info *ei = (struct ext4_inode_info *) foo;
INIT_LIST_HEAD(&ei->i_orphan);
init_rwsem(&ei->xattr_sem);
init_rwsem(&ei->i_data_sem);
init_rwsem(&ei->i_mmap_sem);
inode_init_once(&ei->vfs_inode);
}
| 15,028 |
14,062 | 0 | ProcRenderCreateGlyphSet (ClientPtr client)
{
GlyphSetPtr glyphSet;
PictFormatPtr format;
int rc, f;
REQUEST(xRenderCreateGlyphSetReq);
REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq);
LEGAL_NEW_RESOURCE(stuff->gsid, client);
rc = dixLookupResourceByType((pointer *)&format, stuff->... | 15,029 |
101,919 | 0 | PrintDialogGtk::~PrintDialogGtk() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (dialog_) {
gtk_widget_destroy(dialog_);
dialog_ = NULL;
}
if (gtk_settings_) {
g_object_unref(gtk_settings_);
gtk_settings_ = NULL;
}
if (page_setup_) {
g_object_unref(page_setup_);
page_s... | 15,030 |
60,208 | 0 | static void __exit cleanup_encrypted(void)
{
crypto_free_shash(hash_tfm);
unregister_key_type(&key_type_encrypted);
}
| 15,031 |
137,091 | 0 | bool InputType::RangeUnderflow(const String& value) const {
if (!IsSteppable())
return false;
const Decimal numeric_value = ParseToNumberOrNaN(value);
if (!numeric_value.IsFinite())
return false;
return numeric_value < CreateStepRange(kRejectAny).Minimum();
}
| 15,032 |
149,291 | 0 | void DatabaseImpl::Count(
int64_t transaction_id,
int64_t object_store_id,
int64_t index_id,
const IndexedDBKeyRange& key_range,
::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info) {
scoped_refptr<IndexedDBCallbacks> callbacks(
new IndexedDBCallbacks(dispatcher_host_->AsWeakPtr()... | 15,033 |
185,229 | 1 | bool ParamTraits<AudioParameters>::Read(const Message* m,
PickleIterator* iter,
AudioParameters* r) {
int format, channel_layout, sample_rate, bits_per_sample,
frames_per_buffer, channels;
if (!m->ReadInt(iter, &format) ||
... | 15,034 |
142,016 | 0 | static void Destroy(const internal::BindStateBase* self) {
delete static_cast<const FakeBindState*>(self);
}
| 15,035 |
42,231 | 0 | int vhost_poll_start(struct vhost_poll *poll, struct file *file)
{
unsigned long mask;
int ret = 0;
if (poll->wqh)
return 0;
mask = file->f_op->poll(file, &poll->table);
if (mask)
vhost_poll_wakeup(&poll->wait, 0, 0, (void *)mask);
if (mask & POLLERR) {
if (poll->wqh)
remove_wait_queue(poll->wqh, &poll... | 15,036 |
143,768 | 0 | void set_run_called() { run_called_ = true; }
| 15,037 |
91,160 | 0 | static int jpeg_embed(Image *ifile, Image *ofile, Image *iptc)
{
unsigned int marker;
unsigned int done = 0;
unsigned int len;
int inx;
if (jpeg_transfer_1(ifile, ofile) != 0xFF)
return 0;
if (jpeg_transfer_1(ifile, ofile) != M_SOI)
return 0;
while (done == MagickFalse)
{
marker=(unsigned ... | 15,038 |
145,892 | 0 | gfx::Rect GetTransformedBounds(aura::Window* window) {
gfx::Rect bounds_in_screen = window->layer()->bounds();
::wm::ConvertRectToScreen(window->parent(), &bounds_in_screen);
gfx::RectF bounds(bounds_in_screen);
gfx::Transform transform(gfx::TransformAboutPivot(
gfx::ToFlooredPoint(bounds.orig... | 15,039 |
186,178 | 1 | int WebContentsImpl::DownloadImage(
const GURL& url,
bool is_favicon,
uint32_t max_bitmap_size,
bool bypass_cache,
const WebContents::ImageDownloadCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
static int next_image_download_id = 0;
const image_downloader::ImageDownloaderPtr& mojo_image_downloader =
GetM... | 15,040 |
132,437 | 0 | void UsbDeviceImpl::Open(const OpenCallback& callback) {
DCHECK(thread_checker_.CalledOnValidThread());
#if defined(OS_CHROMEOS)
chromeos::PermissionBrokerClient* client =
chromeos::DBusThreadManager::Get()->GetPermissionBrokerClient();
DCHECK(client) << "Could not get permission broker client.";
client-... | 15,041 |
106,937 | 0 | bool RenderBox::sizesToIntrinsicLogicalWidth(LogicalWidthType widthType) const
{
if (isFloating() || (isInlineBlockOrInlineTable() && !isHTMLMarquee()))
return true;
Length logicalWidth = (widthType == MaxLogicalWidth) ? style()->logicalMaxWidth() : style()->logicalWidth();
if (logicalWidth.type() ... | 15,042 |
99,803 | 0 | void WebPluginDelegateStub::OnDidFinishManualLoading() {
delegate_->DidFinishManualLoading();
}
| 15,043 |
28,626 | 0 | void qeth_schedule_recovery(struct qeth_card *card)
{
QETH_CARD_TEXT(card, 2, "startrec");
if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0)
schedule_work(&card->kernel_thread_starter);
}
| 15,044 |
23,274 | 0 | static int decode_attr_mode(struct xdr_stream *xdr, uint32_t *bitmap, umode_t *mode)
{
uint32_t tmp;
__be32 *p;
int ret = 0;
*mode = 0;
if (unlikely(bitmap[1] & (FATTR4_WORD1_MODE - 1U)))
return -EIO;
if (likely(bitmap[1] & FATTR4_WORD1_MODE)) {
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
goto out_... | 15,045 |
122,689 | 0 | bool Extension::LoadManagedModeSites(
const DictionaryValue* content_pack_value,
string16* error) {
if (!content_pack_value->HasKey(keys::kContentPackSites))
return true;
FilePath::StringType site_list_str;
if (!content_pack_value->GetString(keys::kContentPackSites, &site_list_str)) {
*error = AS... | 15,046 |
26,265 | 0 | context_switch(struct rq *rq, struct task_struct *prev,
struct task_struct *next)
{
struct mm_struct *mm, *oldmm;
prepare_task_switch(rq, prev, next);
mm = next->mm;
oldmm = prev->active_mm;
/*
* For paravirt, this is coupled with an exit in switch_to to
* combine the page table reload and the switch... | 15,047 |
123,017 | 0 | void RenderWidgetHostImpl::OnMsgUnlockMouse() {
RejectMouseLockOrUnlockIfNecessary();
}
| 15,048 |
37,051 | 0 | static void free_nested(struct vcpu_vmx *vmx)
{
if (!vmx->nested.vmxon)
return;
vmx->nested.vmxon = false;
nested_release_vmcs12(vmx);
if (enable_shadow_vmcs)
free_vmcs(vmx->nested.current_shadow_vmcs);
/* Unpin physical memory we referred to in current vmcs02 */
if (vmx->nested.apic_access_page) {
nested_... | 15,049 |
116,131 | 0 | ResourceRequestInfoImpl* ResourceDispatcherHostImpl::CreateRequestInfo(
ResourceHandler* handler,
int child_id,
int route_id,
bool download,
ResourceContext* context) {
return new ResourceRequestInfoImpl(
handler,
PROCESS_TYPE_RENDERER,
child_id,
route_id,
0,
re... | 15,050 |
49,776 | 0 | static int arcmsr_hbaB_polling_ccbdone(struct AdapterControlBlock *acb,
struct CommandControlBlock *poll_ccb)
{
struct MessageUnit_B *reg = acb->pmuB;
struct ARCMSR_CDB *arcmsr_cdb;
struct CommandControlBlock *ccb;
uint32_t flag_ccb, poll_ccb_done = 0, poll_count = 0;
int index, rtn;
bool error;
polling_hbb... | 15,051 |
172,690 | 0 | status_t MediaPlayer::setVideoSurfaceTexture(
const sp<IGraphicBufferProducer>& bufferProducer)
{
ALOGV("setVideoSurfaceTexture");
Mutex::Autolock _l(mLock);
if (mPlayer == 0) return NO_INIT;
return mPlayer->setVideoSurfaceTexture(bufferProducer);
}
| 15,052 |
115,674 | 0 | MATCHER_P2(EqualsKeyEvent, keycode, pressed, "") {
return arg.keycode() == keycode && arg.pressed() == pressed;
}
| 15,053 |
88,193 | 0 | XML_GetInputContext(XML_Parser parser, int *offset, int *size) {
#ifdef XML_CONTEXT_BYTES
if (parser == NULL)
return NULL;
if (parser->m_eventPtr && parser->m_buffer) {
if (offset != NULL)
*offset = (int)(parser->m_eventPtr - parser->m_buffer);
if (size != NULL)
*size = (int)(parser->m_buffe... | 15,054 |
19,793 | 0 | i915_gem_execbuffer_wait_for_flips(struct intel_ring_buffer *ring, u32 flips)
{
u32 plane, flip_mask;
int ret;
/* Check for any pending flips. As we only maintain a flip queue depth
* of 1, we can simply insert a WAIT for the next display flip prior
* to executing the batch and avoid stalling the CPU.
*/
fo... | 15,055 |
123,583 | 0 | void InspectorAgentRegistry::discardAgents()
{
for (size_t i = 0; i < m_agents.size(); i++)
m_agents[i]->discardAgent();
}
| 15,056 |
9,388 | 0 | int ssl3_connect(SSL *s)
{
BUF_MEM *buf = NULL;
unsigned long Time = (unsigned long)time(NULL);
void (*cb) (const SSL *ssl, int type, int val) = NULL;
int ret = -1;
int new_state, state, skip = 0;
RAND_add(&Time, sizeof(Time), 0);
ERR_clear_error();
clear_sys_error();
if (s->info_c... | 15,057 |
68,401 | 0 | static void perf_pmu_output_stop(struct perf_event *event)
{
struct perf_event *iter;
int err, cpu;
restart:
rcu_read_lock();
list_for_each_entry_rcu(iter, &event->rb->event_list, rb_entry) {
/*
* For per-CPU events, we need to make sure that neither they
* nor their children are running; for cpu==-1 event... | 15,058 |
58,109 | 0 | SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param)
{
struct sched_param lp;
struct task_struct *p;
int retval;
if (!param || pid < 0)
return -EINVAL;
rcu_read_lock();
p = find_process_by_pid(pid);
retval = -ESRCH;
if (!p)
goto out_unlock;
retval = security_task_getscheduler(... | 15,059 |
129,380 | 0 | Shader* GetShaderInfoNotProgram(
GLuint client_id, const char* function_name) {
Shader* shader = GetShader(client_id);
if (!shader) {
if (GetProgram(client_id)) {
LOCAL_SET_GL_ERROR(
GL_INVALID_OPERATION, function_name, "program passed for shader");
} else {
LOCAL... | 15,060 |
149,043 | 0 | static int cannotBeFunction(Parse *pParse, struct SrcList_item *pFrom){
if( pFrom->fg.isTabFunc ){
sqlite3ErrorMsg(pParse, "'%s' is not a function", pFrom->zName);
return 1;
}
return 0;
}
| 15,061 |
182,732 | 1 | qedi_dbg_notice(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
const char *fmt, ...)
{
va_list va;
struct va_format vaf;
char nfunc[32];
memset(nfunc, 0, sizeof(nfunc));
memcpy(nfunc, func, sizeof(nfunc) - 1);
va_start(va, fmt);
vaf.fmt = fmt;
vaf.va = &va;
if (!(qedi_dbg_log & QEDI_LOG_NOTICE))
goto ret;... | 15,062 |
156,094 | 0 | RequestQuery ParseQuery(const GURL& url) {
RequestQuery queries;
for (QueryIterator it(url); !it.IsAtEnd(); it.Advance()) {
std::string unescaped_query;
UnescapeBinaryURLComponent(
it.GetKey(), UnescapeRule::REPLACE_PLUS_WITH_SPACE, &unescaped_query);
queries[unescaped_query].push_back(it.GetUne... | 15,063 |
154,107 | 0 | void GLES2DecoderImpl::DoVertexAttribI4i(
GLuint index, GLint v0, GLint v1, GLint v2, GLint v3) {
GLint v[4] = { v0, v1, v2, v3 };
if (SetVertexAttribValue("glVertexAttribI4i", index, v)) {
state_.SetGenericVertexAttribBaseType(
index, SHADER_VARIABLE_INT);
api()->glVertexAttribI4iFn(index, v0, ... | 15,064 |
86,172 | 0 | static int amd_pinconf_group_get(struct pinctrl_dev *pctldev,
unsigned int group,
unsigned long *config)
{
const unsigned *pins;
unsigned npins;
int ret;
ret = amd_get_group_pins(pctldev, group, &pins, &npins);
if (ret)
return ret;
if (amd_pinconf_get(pctldev, pins[0], config))
return -ENOTSUPP;
... | 15,065 |
73,613 | 0 | MagickExport IndexPacket *GetAuthenticIndexQueue(const Image *image)
{
CacheInfo
*restrict cache_info;
const int
id = GetOpenMPThreadId();
assert(image != (const Image *) NULL);
assert(image->signature == MagickSignature);
assert(image->cache != (Cache) NULL);
cache_info=(CacheInfo *) image->cache... | 15,066 |
99,215 | 0 | explicit PdfUnsupportedInfoBarDelegate(Browser* browser)
: LinkInfoBarDelegate(NULL),
browser_(browser) {
}
| 15,067 |
139,796 | 0 | AshVisibilityController() {}
| 15,068 |
33,822 | 0 | static int vq_access_ok(struct vhost_dev *d, unsigned int num,
struct vring_desc __user *desc,
struct vring_avail __user *avail,
struct vring_used __user *used)
{
size_t s = vhost_has_feature(d, VIRTIO_RING_F_EVENT_IDX) ? 2 : 0;
return access_ok(VERIFY_READ, desc, num * sizeof *desc) &&
access_ok(VER... | 15,069 |
96,731 | 0 | MagickExport ChannelStatistics *GetImageStatistics(const Image *image,
ExceptionInfo *exception)
{
ChannelStatistics
*channel_statistics;
double
area,
*histogram,
standard_deviation;
MagickStatusType
status;
QuantumAny
range;
register ssize_t
i;
size_t
depth;
ssize_... | 15,070 |
155,778 | 0 | void DiceResponseHandler::DeleteTokenFetcher(DiceTokenFetcher* token_fetcher) {
for (auto it = token_fetchers_.begin(); it != token_fetchers_.end(); ++it) {
if (it->get() == token_fetcher) {
token_fetchers_.erase(it);
return;
}
}
NOTREACHED();
}
| 15,071 |
55,352 | 0 | static int atl2_up(struct atl2_adapter *adapter)
{
struct net_device *netdev = adapter->netdev;
int err = 0;
u32 val;
/* hardware has been reset, we need to reload some things */
err = atl2_init_hw(&adapter->hw);
if (err) {
err = -EIO;
return err;
}
atl2_set_multi(netdev);
init_ring_ptrs(adapter);
atl... | 15,072 |
36,523 | 0 | void snd_card_info_read_oss(struct snd_info_buffer *buffer)
{
int idx, count;
struct snd_card *card;
for (idx = count = 0; idx < SNDRV_CARDS; idx++) {
mutex_lock(&snd_card_mutex);
if ((card = snd_cards[idx]) != NULL) {
count++;
snd_iprintf(buffer, "%s\n", card->longname);
}
mutex_unlock(&snd_card_mute... | 15,073 |
28,988 | 0 | int ssl_close_notify( ssl_context *ssl )
{
int ret;
SSL_DEBUG_MSG( 2, ( "=> write close notify" ) );
if( ( ret = ssl_flush_output( ssl ) ) != 0 )
{
SSL_DEBUG_RET( 1, "ssl_flush_output", ret );
return( ret );
}
if( ssl->state == SSL_HANDSHAKE_OVER )
{
if( ( ret = ss... | 15,074 |
66,495 | 0 | static void fill_skb_pool(rtl8150_t *dev)
{
struct sk_buff *skb;
int i;
for (i = 0; i < RX_SKB_POOL_SIZE; i++) {
if (dev->rx_skb_pool[i])
continue;
skb = dev_alloc_skb(RTL8150_MTU + 2);
if (!skb) {
return;
}
skb_reserve(skb, 2);
dev->rx_skb_pool[i] = skb;
}
}
| 15,075 |
177,439 | 0 | long SeekHead::Parse() {
IMkvReader* const pReader = m_pSegment->m_pReader;
long long pos = m_start;
const long long stop = m_start + m_size;
int entry_count = 0;
int void_element_count = 0;
while (pos < stop) {
long long id, size;
const long status = ParseElementHeader(pReader, pos, stop, id, size);
if ... | 15,076 |
123,001 | 0 | void RenderWidgetHostImpl::OnMsgDidActivateAcceleratedCompositing(
bool activated) {
TRACE_EVENT1("renderer_host",
"RenderWidgetHostImpl::OnMsgDidActivateAcceleratedCompositing",
"activated", activated);
is_accelerated_compositing_active_ = activated;
if (view_)
view_->OnAcce... | 15,077 |
173,952 | 0 | Block::Lacing Block::GetLacing() const {
const int value = int(m_flags & 0x06) >> 1;
return static_cast<Lacing>(value);
}
| 15,078 |
36,451 | 0 | static int snd_ctl_dev_free(struct snd_device *device)
{
struct snd_card *card = device->device_data;
struct snd_kcontrol *control;
down_write(&card->controls_rwsem);
while (!list_empty(&card->controls)) {
control = snd_kcontrol(card->controls.next);
snd_ctl_remove(card, control);
}
up_write(&card->controls_... | 15,079 |
97,226 | 0 | void WebFrameLoaderClient::provisionalLoadStarted() {
}
| 15,080 |
116,002 | 0 | string16 ExtensionGlobalError::GetBubbleViewTitle() {
return l10n_util::GetStringUTF16(IDS_EXTENSION_ALERT_TITLE);
}
| 15,081 |
135,680 | 0 | void FrameSelection::SetSelectionFromNone() {
Document* document = frame_->GetDocument();
if (!ComputeVisibleSelectionInDOMTreeDeprecated().IsNone() ||
!(blink::HasEditableStyle(*document)))
return;
Element* document_element = document->documentElement();
if (!document_element)
return;
if (HTM... | 15,082 |
144,700 | 0 | void WebContentsImpl::UpdateState(RenderViewHost* rvh,
int32_t page_id,
const PageState& page_state) {
DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries());
if (rvh->GetDelegate()->GetAsWebContents() != this)
return;
RenderViewHostI... | 15,083 |
140,924 | 0 | void PresentationConnection::send(Blob* data, ExceptionState& exceptionState) {
ASSERT(data);
if (!canSendMessage(exceptionState))
return;
m_messages.append(new Message(data->blobDataHandle()));
handleMessageQueue();
}
| 15,084 |
30,300 | 0 | stack_trace_call(unsigned long ip, unsigned long parent_ip,
struct ftrace_ops *op, struct pt_regs *pt_regs)
{
int cpu;
preempt_disable_notrace();
cpu = raw_smp_processor_id();
/* no atomic needed, we only modify this variable by this cpu */
if (per_cpu(trace_active, cpu)++ != 0)
goto out;
check_stack();
... | 15,085 |
80,450 | 0 | GF_Box *stri_New()
{
ISOM_DECL_BOX_ALLOC(GF_SubTrackInformationBox, GF_ISOM_BOX_TYPE_STRI);
return (GF_Box *)tmp;
}
| 15,086 |
125,724 | 0 | base::i18n::TextDirection WebTextDirectionToChromeTextDirection(
WebKit::WebTextDirection dir) {
switch (dir) {
case WebKit::WebTextDirectionLeftToRight:
return base::i18n::LEFT_TO_RIGHT;
case WebKit::WebTextDirectionRightToLeft:
return base::i18n::RIGHT_TO_LEFT;
default:
NOTREACHED(... | 15,087 |
76,837 | 0 | decode_OFPAT_RAW_SET_DL_SRC(const struct ofp_action_dl_addr *a,
enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
ofpact_put_SET_ETH_SRC(out)->mac = a->dl_addr;
return 0;
}
| 15,088 |
11,385 | 0 | fbCombineMaskU (CARD32 *src, const CARD32 *mask, int width)
{
int i;
for (i = 0; i < width; ++i) {
CARD32 a = READ(mask + i) >> 24;
CARD32 s = READ(src + i);
FbByteMul(s, a);
WRITE(src + i, s);
}
}
| 15,089 |
89,984 | 0 | size_t ZSTD_CCtxParams_reset(ZSTD_CCtx_params* params)
{
return ZSTD_CCtxParams_init(params, ZSTD_CLEVEL_DEFAULT);
}
| 15,090 |
137,294 | 0 | void Textfield::SetStyle(gfx::TextStyle style, bool value) {
GetRenderText()->SetStyle(style, value);
SchedulePaint();
}
| 15,091 |
137,878 | 0 | void MediaControlFullscreenButtonElement::setIsFullscreen(bool isFullscreen) {
setDisplayType(isFullscreen ? MediaExitFullscreenButton
: MediaEnterFullscreenButton);
}
| 15,092 |
151,655 | 0 | bool Browser::CanCloseWithInProgressDownloads() {
if (cancel_download_confirmation_state_ != NOT_PROMPTED)
return cancel_download_confirmation_state_ != WAITING_FOR_RESPONSE;
int num_downloads_blocking;
Browser::DownloadClosePreventionType dialog_type =
OkToCloseWithInProgressDownloads(&num_downloads_b... | 15,093 |
167,680 | 0 | void WebRuntimeFeatures::EnableAdTagging(bool enable) {
RuntimeEnabledFeatures::SetAdTaggingEnabled(enable);
}
| 15,094 |
103,147 | 0 | void Browser::OpenClearBrowsingDataDialog() {
UserMetrics::RecordAction(UserMetricsAction("ClearBrowsingData_ShowDlg"),
profile_);
ShowOptionsTab(chrome::kClearBrowserDataSubPage);
}
| 15,095 |
135,091 | 0 | MockFrontend()
: last_host_id_(-222), last_cache_id_(-222),
last_status_(APPCACHE_STATUS_OBSOLETE),
last_status_changed_(APPCACHE_STATUS_OBSOLETE),
last_event_id_(APPCACHE_OBSOLETE_EVENT),
content_blocked_(false) {
}
| 15,096 |
63,582 | 0 | xsmp_get_app_name (GsmClient *client)
{
SmProp *prop;
char *name;
prop = find_property (GSM_XSMP_CLIENT (client), SmProgram, NULL);
name = prop_to_command (prop);
return name;
}
| 15,097 |
78,766 | 0 | static int muscle_pin_cmd(sc_card_t *card, struct sc_pin_cmd_data *cmd,
int *tries_left)
{
muscle_private_t* priv = MUSCLE_DATA(card);
const int bufferLength = MSC_MAX_PIN_COMMAND_LENGTH;
u8 buffer[MSC_MAX_PIN_COMMAND_LENGTH];
switch(cmd->cmd) {
case SC_PIN_CMD_VERIFY:
switch(cmd->pin_type) {
case SC_AC_CH... | 15,098 |
137,542 | 0 | bool PrintWebViewHelper::PrintPreviewContext::IsFinalPageRendered() const {
DCHECK(IsRendering());
return static_cast<size_t>(current_page_index_) == pages_to_render_.size();
}
| 15,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.