mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8210598: Strengthen Windows Access Bridge Support
Reviewed-by: prr, psadhukhan, rhalade, mschoene
This commit is contained in:
parent
68f33ebd5a
commit
9a9b3e9ac5
1 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -32,6 +32,7 @@
|
||||||
#include "AccessBridgePackages.h" // for debugging only
|
#include "AccessBridgePackages.h" // for debugging only
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
#include <new>
|
||||||
|
|
||||||
DEBUG_CODE(extern HWND theDialogWindow);
|
DEBUG_CODE(extern HWND theDialogWindow);
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -46,6 +47,9 @@ AccessBridgeQueueElement::AccessBridgeQueueElement(char *buf, int size) {
|
||||||
next = (AccessBridgeQueueElement *) 0;
|
next = (AccessBridgeQueueElement *) 0;
|
||||||
previous = (AccessBridgeQueueElement *) 0;
|
previous = (AccessBridgeQueueElement *) 0;
|
||||||
buffer = (char *) malloc(bufsize);
|
buffer = (char *) malloc(bufsize);
|
||||||
|
if (buffer == NULL) {
|
||||||
|
throw std::bad_alloc();
|
||||||
|
}
|
||||||
memcpy(buffer, buf, bufsize);
|
memcpy(buffer, buf, bufsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue