Skip to content
Permalink
Browse files
Switch new soft-linking debug asserts to release asserts
<http://webkit.org/b/142176>

Reviewed by Alex Christensen.

* platform/mac/SoftLinking.h:
(SOFT_LINK_CONSTANT_SOURCE): Switch to release assert.
(SOFT_LINK_FUNCTION_SOURCE): Ditto.
* platform/win/SoftLinking.h:
(SOFT_LINK_CONSTANT_SOURCE): Ditto.
(SOFT_LINK_FUNCTION_SOURCE): Ditto.  Note that this method is
effectively only called once because the function pointer is
replaced after the first time it's called.


Canonical link: https://commits.webkit.org/160362@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
ddkilzer committed Mar 5, 2015
1 parent c8cbc7a commit c8acfe713f0d1baad45ba17e39a6d6e2718e6a8b
Showing 3 changed files with 20 additions and 4 deletions.
@@ -1,3 +1,19 @@
2015-03-04 David Kilzer <ddkilzer@apple.com>

Switch new soft-linking debug asserts to release asserts
<http://webkit.org/b/142176>

Reviewed by Alex Christensen.

* platform/mac/SoftLinking.h:
(SOFT_LINK_CONSTANT_SOURCE): Switch to release assert.
(SOFT_LINK_FUNCTION_SOURCE): Ditto.
* platform/win/SoftLinking.h:
(SOFT_LINK_CONSTANT_SOURCE): Ditto.
(SOFT_LINK_FUNCTION_SOURCE): Ditto. Note that this method is
effectively only called once because the function pointer is
replaced after the first time it's called.

2015-03-04 Alex Christensen <achristensen@webkit.org>

Optimize content extensions.
@@ -337,7 +337,7 @@
static dispatch_once_t once; \
dispatch_once(&once, ^{ \
void* constant = dlsym(framework##Library(), #variableName); \
ASSERT_WITH_MESSAGE(constant, "%s", dlerror()); \
RELEASE_ASSERT_WITH_MESSAGE(constant, "%s", dlerror()); \
constant##framework##variableName = *static_cast<variableType*>(constant); \
}); \
return constant##framework##variableName; \
@@ -368,7 +368,7 @@
static dispatch_once_t once; \
dispatch_once(&once, ^{ \
softLink##framework##functionName = (resultType (*) parameterDeclarations) dlsym(framework##Library(), #functionName); \
ASSERT_WITH_MESSAGE(softLink##framework##functionName, "%s", dlerror()); \
RELEASE_ASSERT_WITH_MESSAGE(softLink##framework##functionName, "%s", dlerror()); \
}); \
return softLink##framework##functionName parameterNames; \
} \
@@ -213,7 +213,7 @@
namespace functionNamespace { \
static void init##framework##variableName(void* context) { \
variableType* ptr = reinterpret_cast<variableType*>(SOFT_LINK_GETPROCADDRESS(framework##Library(), #variableName)); \
ASSERT(ptr); \
RELEASE_ASSERT(ptr); \
*static_cast<variableType*>(context) = *ptr; \
} \
variableType get_##framework##_##variableName(); \
@@ -242,7 +242,7 @@
static resultType __cdecl init##framework##functionName parameterDeclarations \
{ \
softLink##framework##functionName = reinterpret_cast<resultType (__cdecl*)parameterDeclarations>(SOFT_LINK_GETPROCADDRESS(framework##Library(), #functionName)); \
ASSERT(softLink##framework##functionName); \
RELEASE_ASSERT(softLink##framework##functionName); \
return softLink##framework##functionName parameterNames; \
} \
}

0 comments on commit c8acfe7

Please sign in to comment.