unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
100,645 | 0 | RenderObject* TextAutosizer::nextInPreOrderSkippingDescendantsOfContainers(const RenderObject* current, const RenderObject* stayWithin)
{
if (current == stayWithin || !isAutosizingContainer(current))
for (RenderObject* child = current->firstChild(); child; child = child->nextSibling())
return ch... | 9,500 |
88,776 | 0 | static void Process_ipfix_option_data(exporter_ipfix_domain_t *exporter, void *data_flowset, FlowSource_t *fs) {
option_offset_t *offset_table;
uint32_t id;
uint8_t *in;
id = GET_FLOWSET_ID(data_flowset);
offset_table = fs->option_offset_table;
while ( offset_table && offset_table->id != id )
offset_table = o... | 9,501 |
11,805 | 0 | polling_inhibitor_disconnected_cb (Inhibitor *inhibitor,
Device *device)
{
device->priv->polling_inhibitors = g_list_remove (device->priv->polling_inhibitors, inhibitor);
g_signal_handlers_disconnect_by_func (inhibitor, polling_inhibitor_disconnected_cb, device);
g_object_unref ... | 9,502 |
169,648 | 0 | void VerifyProcessIsForegrounded(WebContents* web_contents) {
constexpr bool kExpectedIsBackground = false;
VerifyProcessPriority(web_contents->GetMainFrame()->GetProcess(),
kExpectedIsBackground);
}
| 9,503 |
137,939 | 0 | Document* AXLayoutObject::getDocument() const {
if (!getLayoutObject())
return nullptr;
return &getLayoutObject()->document();
}
| 9,504 |
62,122 | 0 | LosslessReduceDepthOK(Image *image)
{
/* Reduce bit depth if it can be reduced losslessly from 16+ to 8.
*
* This is true if the high byte and the next highest byte of
* each sample of the image, the colormap, and the background color
* are equal to each other. We check this by seeing if the sa... | 9,505 |
71,242 | 0 | void kvm_set_pfn_dirty(kvm_pfn_t pfn)
{
if (!kvm_is_reserved_pfn(pfn)) {
struct page *page = pfn_to_page(pfn);
if (!PageReserved(page))
SetPageDirty(page);
}
}
| 9,506 |
170,646 | 0 | void NsDisable(preproc_effect_t *effect)
{
ALOGV("NsDisable");
webrtc::NoiseSuppression *ns = static_cast<webrtc::NoiseSuppression *>(effect->engine);
ns->Enable(false);
}
| 9,507 |
6,808 | 0 | enum act_return http_action_reject(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s, int flags)
{
channel_abort(&s->req);
channel_abort(&s->res);
s->req.analysers = 0;
s->res.analysers = 0;
HA_ATOMIC_ADD(&s->be->be_counters.denied_req, 1);
HA_ATOM... | 9,508 |
152,018 | 0 | void RenderFrameHostImpl::OnBeforeUnloadACK(
bool proceed,
const base::TimeTicks& renderer_before_unload_start_time,
const base::TimeTicks& renderer_before_unload_end_time) {
ProcessBeforeUnloadACK(proceed, false /* treat_as_final_ack */,
renderer_before_unload_start_time,
... | 9,509 |
25,982 | 0 | static void cpu_clock_event_read(struct perf_event *event)
{
cpu_clock_event_update(event);
}
| 9,510 |
6,617 | 0 | check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len,
const char *permitgroup)
{
long i;
ref *permitlist = NULL;
/* an empty string (first character == 0) if '\' character is */
/* recognized as a file name separator as on DOS & Windows */
const char... | 9,511 |
167,466 | 0 | MojoResult DataPipeConsumerDispatcher::AddWatcherRef(
const scoped_refptr<WatcherDispatcher>& watcher,
uintptr_t context) {
base::AutoLock lock(lock_);
if (is_closed_ || in_transit_)
return MOJO_RESULT_INVALID_ARGUMENT;
return watchers_.Add(watcher, context, GetHandleSignalsStateNoLock());
}
| 9,512 |
161,111 | 0 | void MediaStreamManager::DeleteRequest(const std::string& label) {
DVLOG(1) << "DeleteRequest({label= " << label << "})";
for (DeviceRequests::iterator request_it = requests_.begin();
request_it != requests_.end(); ++request_it) {
if (request_it->first == label) {
std::unique_ptr<DeviceRequest> req... | 9,513 |
138,408 | 0 | void Document::close(ExceptionState& exceptionState)
{
if (importLoader()) {
exceptionState.throwDOMException(InvalidStateError, "Imported document doesn't support close().");
return;
}
if (!scriptableDocumentParser() || !scriptableDocumentParser()->wasCreatedByScript() || !scriptableDocum... | 9,514 |
155,365 | 0 | void ChromeContentBrowserClient::GetSchemesBypassingSecureContextCheckWhitelist(
std::set<std::string>* schemes) {
*schemes = secure_origin_whitelist::GetSchemesBypassingSecureContextCheck();
}
| 9,515 |
12,655 | 0 | expand_check_condition(uschar *condition, uschar *m1, uschar *m2)
{
int rc;
uschar *ss = expand_string(condition);
if (ss == NULL)
{
if (!expand_string_forcedfail && !search_find_defer)
log_write(0, LOG_MAIN|LOG_PANIC, "failed to expand condition \"%s\" "
"for %s %s: %s", condition, m1, m2, expand_string_... | 9,516 |
20,884 | 0 | gpa_t translate_nested_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access)
{
gpa_t t_gpa;
struct x86_exception exception;
BUG_ON(!mmu_is_nested(vcpu));
/* NPT walks are always user-walks */
access |= PFERR_USER_MASK;
t_gpa = vcpu->arch.mmu.gva_to_gpa(vcpu, gpa, access, &exception);
return t_gpa;
}
| 9,517 |
164,545 | 0 | static const Mem *columnNullValue(void){
/* Even though the Mem structure contains an element
** of type i64, on certain architectures (x86) with certain compiler
** switches (-Os), gcc may align this Mem object on a 4-byte boundary
** instead of an 8-byte one. This all works fine, except that when
** running... | 9,518 |
29,483 | 0 | int oz_cdev_init(void)
{
oz_app_enable(OZ_APPID_SERIAL, 1);
return 0;
}
| 9,519 |
50,390 | 0 | posix_acl_xattr_get(const struct xattr_handler *handler,
struct dentry *unused, struct inode *inode,
const char *name, void *value, size_t size)
{
struct posix_acl *acl;
int error;
if (!IS_POSIXACL(inode))
return -EOPNOTSUPP;
if (S_ISLNK(inode->i_mode))
return -EOPNOTSUPP;
acl = get_acl(inode, ha... | 9,520 |
87,815 | 0 | R_API void r_core_cmd_help(const RCore *core, const char *help[]) {
r_cons_cmd_help (help, core->print->flags & R_PRINT_FLAGS_COLOR);
}
| 9,521 |
141,854 | 0 | void KioskNextHomeInterfaceBrokerImpl::GetIdentityAccessor(
::identity::mojom::IdentityAccessorRequest request) {
connector_->BindInterface(::identity::mojom::kServiceName,
std::move(request));
}
| 9,522 |
125,022 | 0 | bool RenderFlexibleBox::hasAutoMarginsInCrossAxis(RenderBox* child) const
{
if (isHorizontalFlow())
return child->style()->marginTop().isAuto() || child->style()->marginBottom().isAuto();
return child->style()->marginLeft().isAuto() || child->style()->marginRight().isAuto();
}
| 9,523 |
82,344 | 0 | NO_INLINE JsVar *jspeBlockOrStatement() {
if (lex->tk=='{') {
jspeBlock();
return 0;
} else {
JsVar *v = jspeStatement();
if (lex->tk==';') JSP_ASSERT_MATCH(';');
return v;
}
}
/** Parse using current lexer until we hit the end of
* input or there was some problem. */
NO_INLINE JsVar *jspPar... | 9,524 |
152,516 | 0 | void RenderFrameImpl::SendUpdateFaviconURL() {
if (frame_->Parent())
return;
blink::WebIconURL::Type icon_types_mask =
static_cast<blink::WebIconURL::Type>(
blink::WebIconURL::kTypeFavicon |
blink::WebIconURL::kTypeTouchPrecomposed |
blink::WebIconURL::kTypeTouch);
WebVec... | 9,525 |
121,879 | 0 | net::URLRequestContextGetter* IOThread::system_url_request_context_getter() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!system_url_request_context_getter_.get()) {
InitSystemRequestContext();
}
return system_url_request_context_getter_.get();
}
| 9,526 |
38,214 | 0 | get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
{
unsigned long address = (unsigned long)uaddr;
struct mm_struct *mm = current->mm;
struct page *page, *page_head;
int err, ro = 0;
/*
* The futex address must be "naturally" aligned.
*/
key->both.offset = address % PAGE_SIZE;
if (u... | 9,527 |
118,284 | 0 | void AutofillDialogViews::OnWidgetBoundsChanged(views::Widget* widget,
const gfx::Rect& new_bounds) {
if (error_bubble_ && error_bubble_->GetWidget() == widget)
return;
if (sign_in_delegate_ && sign_in_web_view_->visible()) {
sign_in_delegate_->UpdateLimitsAn... | 9,528 |
1,884 | 0 | static void reds_handle_read_link_done(void *opaque)
{
RedLinkInfo *link = (RedLinkInfo *)opaque;
SpiceLinkMess *link_mess = link->link_mess;
AsyncRead *obj = &link->async_read;
uint32_t num_caps = link_mess->num_common_caps + link_mess->num_channel_caps;
uint32_t *caps = (uint32_t *)((uint8_t *)lin... | 9,529 |
59,673 | 0 | static void csnmp_host_definition_destroy(void *arg) /* {{{ */
{
host_definition_t *hd;
hd = arg;
if (hd == NULL)
return;
if (hd->name != NULL) {
DEBUG("snmp plugin: Destroying host definition for host `%s'.", hd->name);
}
csnmp_host_close_session(hd);
sfree(hd->name);
sfree(hd->address);
... | 9,530 |
36,224 | 0 | static void mntput_no_expire(struct mount *mnt)
{
put_again:
rcu_read_lock();
mnt_add_count(mnt, -1);
if (likely(mnt->mnt_ns)) { /* shouldn't be the last one */
rcu_read_unlock();
return;
}
lock_mount_hash();
if (mnt_get_count(mnt)) {
rcu_read_unlock();
unlock_mount_hash();
return;
}
if (unlikely(mnt-... | 9,531 |
575 | 0 | pdf_init_csi(fz_context *ctx, pdf_csi *csi, pdf_document *doc, pdf_obj *rdb, pdf_lexbuf *buf, fz_cookie *cookie)
{
memset(csi, 0, sizeof *csi);
csi->doc = doc;
csi->rdb = rdb;
csi->buf = buf;
csi->cookie = cookie;
}
| 9,532 |
71,093 | 0 | cmsBool WritePositionTable(struct _cms_typehandler_struct* self,
cmsIOHANDLER* io,
cmsUInt32Number SizeOfTag,
cmsUInt32Number Count,
cmsUInt32Number BaseOffset,
void... | 9,533 |
39,566 | 0 | BOOL license_read_platform_challenge_packet(rdpLicense* license, wStream* s)
{
BYTE MacData[16];
UINT32 ConnectFlags = 0;
DEBUG_LICENSE("Receiving Platform Challenge Packet");
if (Stream_GetRemainingLength(s) < 4)
return FALSE;
Stream_Read_UINT32(s, ConnectFlags); /* ConnectFlags, Reserved (4 bytes) */
/* E... | 9,534 |
181,031 | 1 | print_bacp_config_options(netdissect_options *ndo,
const u_char *p, int length)
{
int len, opt;
if (length < 2)
return 0;
ND_TCHECK2(*p, 2);
len = p[1];
opt = p[0];
if (length < len)
return 0;
if (len < 2) {
ND_PRINT((ndo, "\n\t %s Option (0x%02x), length %u (length bogus, should be >= 2)",
tok2str(bacconfopts_values... | 9,535 |
137,911 | 0 | void AXLayoutObject::addPopupChildren() {
if (!isHTMLInputElement(getNode()))
return;
if (AXObject* axPopup = toHTMLInputElement(getNode())->popupRootAXObject())
m_children.push_back(axPopup);
}
| 9,536 |
130,556 | 0 | static void TestObjectConstructorGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8::Handle<v8::Value> data = info.Data();
ASSERT(data->IsExternal());
V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->CreationContext());
if (!perContextData)
... | 9,537 |
86,984 | 0 | static TEE_Result umap_add_region(struct vm_info *vmi, struct vm_region *reg)
{
struct vm_region *r;
struct vm_region *prev_r;
vaddr_t va_range_base;
size_t va_range_size;
vaddr_t va;
core_mmu_get_user_va_range(&va_range_base, &va_range_size);
/* Check alignment, it has to be at least SMALL_PAGE based */
if (... | 9,538 |
31,260 | 0 | int crypto_hash_walk_first(struct ahash_request *req,
struct crypto_hash_walk *walk)
{
walk->total = req->nbytes;
if (!walk->total)
return 0;
walk->alignmask = crypto_ahash_alignmask(crypto_ahash_reqtfm(req));
walk->sg = req->src;
walk->flags = req->base.flags;
return hash_walk_new_entry(walk);
}
| 9,539 |
128,196 | 0 | String Notification::lang() const
{
return m_data.lang;
}
| 9,540 |
186,348 | 1 | void ResourcePrefetchPredictor::LearnOrigins(
const std::string& host,
const GURL& main_frame_origin,
const std::map<GURL, OriginRequestSummary>& summaries) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (host.size() > ResourcePrefetchPredictorTables::kMaxStringLength)
return;
OriginData data;
bool exists = origin_d... | 9,541 |
47,078 | 0 | static void twofish_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
{
twofish_enc_blk(crypto_tfm_ctx(tfm), dst, src);
}
| 9,542 |
28,410 | 0 | void fib6_force_start_gc(struct net *net)
{
if (!timer_pending(&net->ipv6.ip6_fib_timer))
mod_timer(&net->ipv6.ip6_fib_timer,
jiffies + net->ipv6.sysctl.ip6_rt_gc_interval);
}
| 9,543 |
125,181 | 0 | void RenderMessageFilter::AsyncOpenFileOnFileThread(const FilePath& path,
int flags,
int message_id,
int routing_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserTh... | 9,544 |
27,481 | 0 | static inline void ipgre_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb)
{
if (INET_ECN_is_ce(iph->tos)) {
if (skb->protocol == htons(ETH_P_IP)) {
IP_ECN_set_ce(ip_hdr(skb));
} else if (skb->protocol == htons(ETH_P_IPV6)) {
IP6_ECN_set_ce(ipv6_hdr(skb));
}
}
}
| 9,545 |
160,396 | 0 | void NormalPage::removeFromHeap() {
arenaForNormalPage()->freePage(this);
}
| 9,546 |
65,708 | 0 | test_deny(u32 deny, struct nfs4_ol_stateid *stp)
{
unsigned char mask = 1 << deny;
return (bool)(stp->st_deny_bmap & mask);
}
| 9,547 |
78,162 | 0 | static int asepcos_init(sc_card_t *card)
{
unsigned long flags;
card->name = "Athena ASEPCOS";
card->cla = 0x00;
/* in case of a Java card try to select the ASEPCOS applet */
if (card->type == SC_CARD_TYPE_ASEPCOS_JAVA) {
int r = asepcos_select_asepcos_applet(card);
if (r != SC_SUCCESS)
return SC_ERROR_I... | 9,548 |
1,525 | 0 | push_callout(i_ctx_t *i_ctx_p, const char *callout_name)
{
int code;
check_estack(1);
code = name_enter_string(imemory, callout_name, esp + 1);
if (code < 0)
return code;
++esp;
r_set_attrs(esp, a_executable);
return o_push_estack;
}
| 9,549 |
4,831 | 0 | FindChildForEvent(SpritePtr pSprite, WindowPtr event)
{
WindowPtr w = DeepestSpriteWin(pSprite);
Window child = None;
/* If the search ends up past the root should the child field be
set to none or should the value in the argument be passed
through. It probably doesn't matter since everyone c... | 9,550 |
47,390 | 0 | static int tgr192_final(struct shash_desc *desc, u8 * out)
{
struct tgr192_ctx *tctx = shash_desc_ctx(desc);
__be64 *dst = (__be64 *)out;
__be64 *be64p;
__le32 *le32p;
u32 t, msb, lsb;
tgr192_update(desc, NULL, 0); /* flush */ ;
msb = 0;
t = tctx->nblocks;
if ((lsb = t << 6) < t) { /* multiply by 64 to make ... | 9,551 |
90,967 | 0 | void CWebServer::Cmd_AddSceneCode(WebEmSession & session, const request& req, Json::Value &root)
{
if (session.rights != 2)
{
session.reply_status = reply::forbidden;
return; //Only admin user allowed
}
std::string sceneidx = request::findValue(&req, "sceneidx");
std::string idx = request::f... | 9,552 |
169,273 | 0 | MockOverscrollControllerImpl()
: content_scrolling_(false),
message_loop_runner_(new MessageLoopRunner) {}
| 9,553 |
58,552 | 0 | void transport_attach(rdpTransport* transport, int sockfd)
{
transport->TcpIn->sockfd = sockfd;
transport->SplitInputOutput = FALSE;
transport->TcpOut = transport->TcpIn;
}
| 9,554 |
138,902 | 0 | void WallpaperManager::RemoveUserWallpaperInfo(const AccountId& account_id) {
if (wallpaper_cache_.find(account_id) != wallpaper_cache_.end())
wallpaper_cache_.erase(account_id);
PrefService* prefs = g_browser_process->local_state();
if (!prefs)
return;
WallpaperInfo info;
GetUserWallpaperInfo(accoun... | 9,555 |
59,852 | 0 | static unsigned get_maxpacket(struct usb_device *udev, int pipe)
{
struct usb_host_endpoint *ep;
ep = usb_pipe_endpoint(udev, pipe);
return le16_to_cpup(&ep->desc.wMaxPacketSize);
}
| 9,556 |
23,997 | 0 | static void airo_set_promisc(struct airo_info *ai) {
Cmd cmd;
Resp rsp;
memset(&cmd, 0, sizeof(cmd));
cmd.cmd=CMD_SETMODE;
clear_bit(JOB_PROMISC, &ai->jobs);
cmd.parm0=(ai->flags&IFF_PROMISC) ? PROMISC : NOPROMISC;
issuecommand(ai, &cmd, &rsp);
up(&ai->sem);
}
| 9,557 |
35,307 | 0 | static struct softnet_data *softnet_get_online(loff_t *pos)
{
struct softnet_data *sd = NULL;
while (*pos < nr_cpu_ids)
if (cpu_online(*pos)) {
sd = &per_cpu(softnet_data, *pos);
break;
} else
++*pos;
return sd;
}
| 9,558 |
183,891 | 1 | PassRefPtr<DocumentFragment> Range::createContextualFragment(const String& markup, ExceptionCode& ec)
{
if (!m_start.container()) {
ec = INVALID_STATE_ERR;
return 0;
}
Node* element = m_start.container()->isElementNode() ? m_start.container() : m_start.container()->parentNode();
if (!element || !element->isHTMLElement... | 9,559 |
14,990 | 0 | ProcListFonts(ClientPtr client)
{
REQUEST(xListFontsReq);
REQUEST_FIXED_SIZE(xListFontsReq, stuff->nbytes);
return ListFonts(client, (unsigned char *) &stuff[1], stuff->nbytes,
stuff->maxNames);
}
| 9,560 |
157,197 | 0 | unsigned WebMediaPlayerImpl::DroppedFrameCount() const {
DCHECK(main_task_runner_->BelongsToCurrentThread());
return GetPipelineStatistics().video_frames_dropped;
}
| 9,561 |
26,201 | 0 | static int swevent_hlist_get(struct perf_event *event)
{
int err;
int cpu, failed_cpu;
if (event->cpu != -1)
return swevent_hlist_get_cpu(event, event->cpu);
get_online_cpus();
for_each_possible_cpu(cpu) {
err = swevent_hlist_get_cpu(event, cpu);
if (err) {
failed_cpu = cpu;
goto fail;
}
}
put_on... | 9,562 |
29,706 | 0 | void *av_realloc(void *ptr, size_t size)
{
#if CONFIG_MEMALIGN_HACK
int diff;
#endif
/* let's disallow possible ambiguous cases */
if (size > (max_alloc_size - 32))
return NULL;
#if CONFIG_MEMALIGN_HACK
if (!ptr)
return av_malloc(size);
diff = ((char *)ptr)[-1];
av_assert0(diff... | 9,563 |
37,107 | 0 | static int init_rmode_identity_map(struct kvm *kvm)
{
int i, idx, r = 0;
pfn_t identity_map_pfn;
u32 tmp;
if (!enable_ept)
return 0;
/* Protect kvm->arch.ept_identity_pagetable_done. */
mutex_lock(&kvm->slots_lock);
if (likely(kvm->arch.ept_identity_pagetable_done))
goto out2;
identity_map_pfn = kvm->ar... | 9,564 |
61,358 | 0 | static int asf_read_metadata(AVFormatContext *s, int64_t size)
{
AVIOContext *pb = s->pb;
ASFContext *asf = s->priv_data;
int n, stream_num, name_len_utf16, name_len_utf8, value_len;
int ret, i;
n = avio_rl16(pb);
for (i = 0; i < n; i++) {
uint8_t *name;
int value_type;
... | 9,565 |
58,471 | 0 | traverse_socks (int print_fd, int sok, char *serverAddr, int port)
{
struct sock_connect sc;
unsigned char buf[256];
sc.version = 4;
sc.type = 1;
sc.port = htons (port);
sc.address = inet_addr (serverAddr);
strncpy (sc.username, prefs.hex_irc_user_name, 9);
send (sok, (char *) &sc, 8 + strlen (sc.username) + ... | 9,566 |
112,926 | 0 | void InsertIntoMap(GDataCacheMetadataMap::CacheMap* cache_map,
const std::string& resource_id,
const std::string& md5,
GDataCache::CacheSubDirectoryType sub_dir_type,
int cache_state) {
cache_map->insert(std::make_pair(
r... | 9,567 |
167,377 | 0 | void SetCookieCallback(bool result) {
ASSERT_TRUE(result);
quit_closure_.Run();
}
| 9,568 |
17,724 | 0 | DGAStealButtonEvent(DeviceIntPtr dev, int index, int button, int is_down)
{
DGAScreenPtr pScreenPriv;
DGAEvent event;
if (!DGAScreenKeyRegistered) /* no DGA */
return FALSE;
pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]);
if (!pScreenPriv || !pScreenPriv->grabMouse)
... | 9,569 |
118,851 | 0 | void WebContentsImpl::DidFailProvisionalLoadWithError(
RenderViewHost* render_view_host,
const ViewHostMsg_DidFailProvisionalLoadWithError_Params& params) {
VLOG(1) << "Failed Provisional Load: " << params.url.possibly_invalid_spec()
<< ", error_code: " << params.error_code
<< ", error_des... | 9,570 |
20,089 | 0 | read_eeprom (long ioaddr, int eep_addr)
{
int i = 1000;
outw (EEP_READ | (eep_addr & 0xff), ioaddr + EepromCtrl);
while (i-- > 0) {
if (!(inw (ioaddr + EepromCtrl) & EEP_BUSY)) {
return inw (ioaddr + EepromData);
}
}
return 0;
}
| 9,571 |
7,337 | 0 | string_tolower (char *string)
{
while (string && string[0])
{
if ((string[0] >= 'A') && (string[0] <= 'Z'))
string[0] += ('a' - 'A');
string = utf8_next_char (string);
}
}
| 9,572 |
111,696 | 0 | void EditorClientBlackBerry::handleKeyboardEvent(KeyboardEvent* event)
{
ASSERT(event);
const PlatformKeyboardEvent* platformEvent = event->keyEvent();
if (!platformEvent)
return;
ASSERT(event->target()->toNode());
Frame* frame = event->target()->toNode()->document()->frame();
ASSERT(f... | 9,573 |
61,413 | 0 | static int mov_read_chap(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
unsigned i, num;
void *new_tracks;
num = atom.size / 4;
if (!(new_tracks = av_malloc_array(num, sizeof(int))))
return AVERROR(ENOMEM);
av_free(c->chapter_tracks);
c->chapter_tracks = new_tracks;
c->nb_chapter_... | 9,574 |
161,886 | 0 | void PrintRenderFrameHelper::ComputePageLayoutInPointsForCss(
blink::WebLocalFrame* frame,
int page_index,
const PrintMsg_Print_Params& page_params,
bool ignore_css_margins,
double* scale_factor,
PageSizeMargins* page_layout_in_points) {
double input_scale_factor = *scale_factor;
PrintMsg_Pr... | 9,575 |
36,670 | 0 | static void recalloc_sock(struct pool *pool, size_t len)
{
size_t old, new;
old = strlen(pool->sockbuf);
new = old + len + 1;
if (new < pool->sockbuf_size)
return;
new = new + (RBUFSIZE - (new % RBUFSIZE));
pool->sockbuf = realloc(pool->sockbuf, new);
if (!pool->sockbuf)
quithere(1, "Failed to realloc pool ... | 9,576 |
185,630 | 1 | void Editor::ChangeSelectionAfterCommand(
const SelectionInDOMTree& new_selection,
const SetSelectionData& options) {
if (new_selection.IsNone())
return;
// See <rdar://problem/5729315> Some shouldChangeSelectedDOMRange contain
// Ranges for selections that are no longer valid
bool selection_did_not_change_dom_positio... | 9,577 |
153,920 | 0 | std::unique_ptr<AbstractTexture> GLES2DecoderImpl::CreateAbstractTexture(
GLenum target,
GLenum internal_format,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum type) {
GLuint service_id = 0;
api()->glGenTexturesFn(1, &service_id);
scoped_refptr<gp... | 9,578 |
34,265 | 0 | static int __btrfs_releasepage(struct page *page, gfp_t gfp_flags)
{
struct extent_io_tree *tree;
struct extent_map_tree *map;
int ret;
tree = &BTRFS_I(page->mapping->host)->io_tree;
map = &BTRFS_I(page->mapping->host)->extent_tree;
ret = try_release_extent_mapping(map, tree, page, gfp_flags);
if (ret == 1) {
... | 9,579 |
130,562 | 0 | static void XMLObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObject* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(info.GetIsolate(), jsValue));
imp->setXMLObjAttr(WTF::getPtr(c... | 9,580 |
8,467 | 0 | void CSoundFile::CheckCPUUsage(UINT nCPU)
{
if (nCPU > 100) nCPU = 100;
gnCPUUsage = nCPU;
if (nCPU < 90)
{
m_dwSongFlags &= ~SONG_CPUVERYHIGH;
} else
if ((m_dwSongFlags & SONG_CPUVERYHIGH) && (nCPU >= 94))
{
UINT i=MAX_CHANNELS;
while (i >= 8)
{
i--;
if (Chn[i].nLength)
{
Chn[i].nLength = C... | 9,581 |
165,016 | 0 | bool HTMLCanvasElement::IsWebGL1Enabled() const {
Document& document = GetDocument();
LocalFrame* frame = document.GetFrame();
if (!frame)
return false;
Settings* settings = frame->GetSettings();
return settings && settings->GetWebGL1Enabled();
}
| 9,582 |
30,517 | 0 | static void nr_insert_socket(struct sock *sk)
{
spin_lock_bh(&nr_list_lock);
sk_add_node(sk, &nr_list);
spin_unlock_bh(&nr_list_lock);
}
| 9,583 |
74,963 | 0 | static UINT drdynvc_virtual_channel_event_detached(drdynvcPlugin* drdynvc)
{
int i;
DVCMAN* dvcman;
if (!drdynvc)
return CHANNEL_RC_BAD_CHANNEL_HANDLE;
dvcman = (DVCMAN*) drdynvc->channel_mgr;
if (!dvcman)
return CHANNEL_RC_BAD_CHANNEL_HANDLE;
for (i = 0; i < dvcman->num_plugins; i++)
{
UINT error;
I... | 9,584 |
56,004 | 0 | static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
{
struct tty_ldisc *new_ldisc;
int r;
/* There is an outstanding reference here so this is safe */
old = tty_ldisc_get(tty, old->ops->num);
WARN_ON(IS_ERR(old));
tty->ldisc = old;
tty_set_termios_ldisc(tty, old->ops->num);
if (tty_ldi... | 9,585 |
152,737 | 0 | bool Histogram::InspectConstructionArguments(const std::string& name,
Sample* minimum,
Sample* maximum,
uint32_t* bucket_count) {
if (*minimum < 1) {
DVLOG(1) << "Histogram: " << ... | 9,586 |
159,291 | 0 | static void CreateContextProviderOnMainThread(
ContextProviderCreationInfo* creation_info,
WaitableEvent* waitable_event) {
DCHECK(IsMainThread());
*creation_info->using_gpu_compositing =
!Platform::Current()->IsGpuCompositingDisabled();
creation_info->created_context_provider =
Platform::Curr... | 9,587 |
149,098 | 0 | static int collationMatch(const char *zColl, Index *pIndex){
int i;
assert( zColl!=0 );
for(i=0; i<pIndex->nColumn; i++){
const char *z = pIndex->azColl[i];
assert( z!=0 || pIndex->aiColumn[i]<0 );
if( pIndex->aiColumn[i]>=0 && 0==sqlite3StrICmp(z, zColl) ){
return 1;
}
}
return 0;
}
| 9,588 |
59,234 | 0 | get_pa_etype_info2(krb5_context context,
krb5_kdc_configuration *config,
METHOD_DATA *md, Key *ckey)
{
krb5_error_code ret = 0;
ETYPE_INFO2 pa;
unsigned char *buf;
size_t len;
pa.len = 1;
pa.val = calloc(1, sizeof(pa.val[0]));
if(pa.val == NULL)
return ENOMEM;
ret = make_ety... | 9,589 |
80,967 | 0 | static inline bool is_icebp(u32 intr_info)
{
return (intr_info & (INTR_INFO_INTR_TYPE_MASK | INTR_INFO_VALID_MASK))
== (INTR_TYPE_PRIV_SW_EXCEPTION | INTR_INFO_VALID_MASK);
}
| 9,590 |
185,960 | 1 | void PaintLayerScrollableArea::UpdateCompositingLayersAfterScroll() {
PaintLayerCompositor* compositor = GetLayoutBox()->View()->Compositor();
if (!compositor->InCompositingMode())
return;
if (UsesCompositedScrolling()) {
DCHECK(Layer()->HasCompositedLayerMapping());
ScrollingCoordinator* scrolling_coordinator = GetSc... | 9,591 |
172,014 | 0 | static void btsock_l2cap_cbk(tBTA_JV_EVT event, tBTA_JV *p_data, void *user_data)
{
int rc;
switch (event) {
case BTA_JV_L2CAP_START_EVT:
on_srv_l2cap_listen_started(&p_data->l2c_start, (uint32_t)user_data);
break;
case BTA_JV_L2CAP_CL_INIT_EVT:
on_cl_l2cap_init(&p_data->l2c_cl_init, (uint32_t)us... | 9,592 |
114,170 | 0 | string16 ChromeContentClient::GetLocalizedString(int message_id) const {
return l10n_util::GetStringUTF16(message_id);
}
| 9,593 |
142,230 | 0 | void FileManagerBrowserTestBase::StartTest() {
LOG(INFO) << "FileManagerBrowserTest::StartTest " << GetFullTestCaseName();
static const base::FilePath test_extension_dir =
base::FilePath(FILE_PATH_LITERAL("ui/file_manager/integration_tests"));
LaunchExtension(test_extension_dir, GetTestExtensionManifestName... | 9,594 |
172,720 | 0 | status_t MediaRecorder::setVideoSource(int vs)
{
ALOGV("setVideoSource(%d)", vs);
if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mIsVideoSourceSet) {
ALOGE("video source has already been set");
return INVALID_OPERATION;
}
if (mCur... | 9,595 |
60,125 | 0 | static RBinFile *r_bin_file_find_by_id(RBin *bin, ut32 binfile_id) {
RBinFile *binfile = NULL;
RListIter *iter = NULL;
r_list_foreach (bin->binfiles, iter, binfile) {
if (binfile->id == binfile_id) {
break;
}
binfile = NULL;
}
return binfile;
}
| 9,596 |
163,197 | 0 | void NavigationControllerImpl::GoToIndex(int index) {
TRACE_EVENT0("browser,navigation,benchmark",
"NavigationControllerImpl::GoToIndex");
if (index < 0 || index >= static_cast<int>(entries_.size())) {
NOTREACHED();
return;
}
if (transient_entry_index_ != -1) {
if (index == transient... | 9,597 |
104,578 | 0 | virtual void TearDown() {
loop_.RunAllPending();
service_.reset();
}
| 9,598 |
176,147 | 0 | bool AMediaCodecActionCode_isRecoverable(int32_t actionCode) {
return (actionCode == ACTION_CODE_RECOVERABLE);
}
| 9,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.