|
Lines 89-94
GJS_DEFINE_PRIV_FROM_JS(ObjectInstance,
Link Here
|
| 89 |
|
89 |
|
| 90 |
static void disassociate_js_gobject (GObject *gobj); |
90 |
static void disassociate_js_gobject (GObject *gobj); |
| 91 |
|
91 |
|
|
|
92 |
static void |
| 93 |
gjs_log_stacktrace(const char *format, |
| 94 |
...) |
| 95 |
{ |
| 96 |
const char *domain; |
| 97 |
va_list args; |
| 98 |
|
| 99 |
domain = g_getenv("G_MESSAGES_DEBUG"); |
| 100 |
|
| 101 |
if (!domain) |
| 102 |
return; |
| 103 |
|
| 104 |
if (!g_str_equal(domain, "all") && |
| 105 |
!strstr(domain, G_LOG_DOMAIN)) |
| 106 |
return; |
| 107 |
|
| 108 |
va_start(args, format); |
| 109 |
g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format, args); |
| 110 |
va_end(args); |
| 111 |
|
| 112 |
gjs_dumpstack(); |
| 113 |
} |
| 114 |
|
| 92 |
typedef enum { |
115 |
typedef enum { |
| 93 |
SOME_ERROR_OCCURRED = false, |
116 |
SOME_ERROR_OCCURRED = false, |
| 94 |
NO_SUCH_G_PROPERTY, |
117 |
NO_SUCH_G_PROPERTY, |
|
Lines 410-421
object_instance_get_prop(JSContext
Link Here
|
| 410 |
return true; |
433 |
return true; |
| 411 |
|
434 |
|
| 412 |
if (priv->g_object_finalized) { |
435 |
if (priv->g_object_finalized) { |
| 413 |
g_critical("Object %s.%s (%p), has been already finalized. " |
436 |
gjs_log_stacktrace("Object %s.%s (%p), has been already finalized. " |
| 414 |
"Impossible to get any property from it.", |
437 |
"Impossible to get any property from it.", |
| 415 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
438 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
| 416 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
439 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
| 417 |
priv->gobj); |
440 |
priv->gobj); |
| 418 |
gjs_dumpstack(); |
|
|
| 419 |
return true; |
441 |
return true; |
| 420 |
} |
442 |
} |
| 421 |
|
443 |
|
|
Lines 530-541
object_instance_set_prop(JSContext
Link Here
|
| 530 |
return result.succeed(); |
552 |
return result.succeed(); |
| 531 |
|
553 |
|
| 532 |
if (priv->g_object_finalized) { |
554 |
if (priv->g_object_finalized) { |
| 533 |
g_critical("Object %s.%s (%p), has been already finalized. " |
555 |
gjs_log_stacktrace("Object %s.%s (%p), has been already finalized. " |
| 534 |
"Impossible to set any property to it.", |
556 |
"Impossible to set any property to it.", |
| 535 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
557 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
| 536 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
558 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
| 537 |
priv->gobj); |
559 |
priv->gobj); |
| 538 |
gjs_dumpstack(); |
|
|
| 539 |
return result.succeed(); |
560 |
return result.succeed(); |
| 540 |
} |
561 |
} |
| 541 |
|
562 |
|
|
Lines 777-788
object_instance_resolve(JSContext
Link Here
|
| 777 |
} |
798 |
} |
| 778 |
|
799 |
|
| 779 |
if (priv->g_object_finalized) { |
800 |
if (priv->g_object_finalized) { |
| 780 |
g_critical("Object %s.%s (%p), has been already finalized. " |
801 |
gjs_log_stacktrace("Object %s.%s (%p), has been already finalized. " |
| 781 |
"Impossible to resolve it.", |
802 |
"Impossible to resolve it.", |
| 782 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
803 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
| 783 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
804 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
| 784 |
priv->gobj); |
805 |
priv->gobj); |
| 785 |
gjs_dumpstack(); |
|
|
| 786 |
|
806 |
|
| 787 |
*resolved = false; |
807 |
*resolved = false; |
| 788 |
return true; |
808 |
return true; |
|
Lines 1471-1481
object_instance_trace(JSTracer *tracer,
Link Here
|
| 1471 |
return; |
1491 |
return; |
| 1472 |
|
1492 |
|
| 1473 |
if (priv->g_object_finalized) { |
1493 |
if (priv->g_object_finalized) { |
| 1474 |
g_debug("Object %s.%s (%p), has been already finalized. " |
1494 |
gjs_log_stacktrace("Object %s.%s (%p), has been already finalized. " |
| 1475 |
"Impossible to trace it.", |
1495 |
"Impossible to trace it.", |
| 1476 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
1496 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
| 1477 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
1497 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
| 1478 |
priv->gobj); |
1498 |
priv->gobj); |
| 1479 |
return; |
1499 |
return; |
| 1480 |
} |
1500 |
} |
| 1481 |
|
1501 |
|
|
Lines 1680-1692
real_connect_func(JSContext *context,
Link Here
|
| 1680 |
return false; |
1700 |
return false; |
| 1681 |
} |
1701 |
} |
| 1682 |
if (priv->g_object_finalized) { |
1702 |
if (priv->g_object_finalized) { |
| 1683 |
g_critical("Object %s.%s (%p), has been already deallocated - impossible to connect to signal. " |
1703 |
gjs_log_stacktrace("Object %s.%s (%p), has been already deallocated - impossible to connect to signal. " |
| 1684 |
"This might be caused by the fact that the object has been destroyed from C " |
1704 |
"This might be caused by the fact that the object has been destroyed from C " |
| 1685 |
"code using something such as destroy(), dispose(), or remove() vfuncs", |
1705 |
"code using something such as destroy(), dispose(), or remove() vfuncs", |
| 1686 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
1706 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
| 1687 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
1707 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
| 1688 |
priv->gobj); |
1708 |
priv->gobj); |
| 1689 |
gjs_dumpstack(); |
|
|
| 1690 |
return true; |
1709 |
return true; |
| 1691 |
} |
1710 |
} |
| 1692 |
|
1711 |
|
|
Lines 1777-1789
emit_func(JSContext *context,
Link Here
|
| 1777 |
} |
1796 |
} |
| 1778 |
|
1797 |
|
| 1779 |
if (priv->g_object_finalized) { |
1798 |
if (priv->g_object_finalized) { |
| 1780 |
g_critical("Object %s.%s (%p), has been already deallocated - impossible to emit signal. " |
1799 |
gjs_log_stacktrace("Object %s.%s (%p), has been already deallocated - impossible to emit signal. " |
| 1781 |
"This might be caused by the fact that the object has been destroyed from C " |
1800 |
"This might be caused by the fact that the object has been destroyed from C " |
| 1782 |
"code using something such as destroy(), dispose(), or remove() vfuncs", |
1801 |
"code using something such as destroy(), dispose(), or remove() vfuncs", |
| 1783 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
1802 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
| 1784 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
1803 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
| 1785 |
priv->gobj); |
1804 |
priv->gobj); |
| 1786 |
gjs_dumpstack(); |
|
|
| 1787 |
return true; |
1805 |
return true; |
| 1788 |
} |
1806 |
} |
| 1789 |
|
1807 |
|
|
Lines 2197-2209
gjs_typecheck_object(JSContext *co
Link Here
|
| 2197 |
} |
2215 |
} |
| 2198 |
|
2216 |
|
| 2199 |
if (priv->g_object_finalized) { |
2217 |
if (priv->g_object_finalized) { |
| 2200 |
g_critical("Object %s.%s (%p), has been already deallocated - impossible to access to it. " |
2218 |
gjs_log_stacktrace("Object %s.%s (%p), has been already deallocated - impossible to access to it. " |
| 2201 |
"This might be caused by the fact that the object has been destroyed from C " |
2219 |
"This might be caused by the fact that the object has been destroyed from C " |
| 2202 |
"code using something such as destroy(), dispose(), or remove() vfuncs", |
2220 |
"code using something such as destroy(), dispose(), or remove() vfuncs", |
| 2203 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
2221 |
priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "", |
| 2204 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
2222 |
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype), |
| 2205 |
priv->gobj); |
2223 |
priv->gobj); |
| 2206 |
gjs_dumpstack(); |
|
|
| 2207 |
|
2224 |
|
| 2208 |
return true; |
2225 |
return true; |
| 2209 |
} |
2226 |
} |
| 2210 |
|
2227 |
|
| 2211 |
|
2228 |
|
| 2212 |
- |
|
|
| 2213 |
</div> |
2229 |
</div> |
| 2214 |
</div> <!-- end .card--> |
2230 |
</div> <!-- end .card--> |
| 2215 |
</div> |
2231 |
</div> |
| 2216 |
<div class="footer pt-4 text-white"> |
2232 |
<div class="footer pt-4 text-white"> |
| 2217 |
<div class="container"> |
2233 |
<div class="container"> |
| 2218 |
<div class="d-flex align-items-center"> |
2234 |
<div class="d-flex align-items-center"> |
| 2219 |
<div> |
2235 |
<div> |
| 2220 |
<div>Powered by <a href="https://pagure.io/pagure" class="notblue">Pagure</a> 5.5</div> |
2236 |
<div>Powered by <a href="https://pagure.io/pagure" class="notblue">Pagure</a> 5.5</div> |
| 2221 |
<div> |
2237 |
<div> |
| 2222 |
<a href="https://docs.pagure.org/pagure/usage/index.html" class="notblue">Documentation</a> • |
2238 |
<a href="https://docs.pagure.org/pagure/usage/index.html" class="notblue">Documentation</a> • |
| 2223 |
<a href="https://pagure.io/pagure/new_issue" class="notblue">File an Issue</a> • |
2239 |
<a href="https://pagure.io/pagure/new_issue" class="notblue">File an Issue</a> • |
| 2224 |
<a href="/about">About this Instance</a> • |
2240 |
<a href="/about">About this Instance</a> • |
| 2225 |
<a href="/ssh_info" class="notblue">SSH Hostkey/Fingerprint</a> |
2241 |
<a href="/ssh_info" class="notblue">SSH Hostkey/Fingerprint</a> |
| 2226 |
</div> |
2242 |
</div> |
| 2227 |
</div> |
2243 |
</div> |
| 2228 |
<div class="ml-auto text-right"> |
2244 |
<div class="ml-auto text-right"> |
| 2229 |
<div>© 2014-2018 Red Hat, Inc. and others.</div> |
2245 |
<div>© 2014-2018 Red Hat, Inc. and others.</div> |
| 2230 |
</div> |
2246 |
</div> |
| 2231 |
</div> |
2247 |
</div> |
| 2232 |
</div> |
2248 |
</div> |
| 2233 |
</div> |
2249 |
</div> |
| 2234 |
<script type="text/javascript" |
2250 |
<script type="text/javascript" |
| 2235 |
src="/static/vendor/jquery/jquery.min.js?version=5.5"> |
2251 |
src="/static/vendor/jquery/jquery.min.js?version=5.5"> |
| 2236 |
</script> |
2252 |
</script> |
| 2237 |
<script src="/static/vendor/bootstrap/bootstrap.bundle.min.js?version=5.5"></script> |
2253 |
<script src="/static/vendor/bootstrap/bootstrap.bundle.min.js?version=5.5"></script> |
| 2238 |
<script type="text/javascript"> |
2254 |
<script type="text/javascript"> |
| 2239 |
</script> |
2255 |
</script> |
| 2240 |
src="/static/vendor/lazyload/lazyload.min.js?version=5.5"> |
2256 |
src="/static/vendor/lazyload/lazyload.min.js?version=5.5"> |
| 2241 |
</script> |
2257 |
</script> |
| 2242 |
lazyload(); |
2258 |
lazyload(); |
| 2243 |
event.stopPropagation(); |
2259 |
event.stopPropagation(); |
| 2244 |
$("#giturl-more").toggle(); |
2260 |
$("#giturl-more").toggle(); |
| 2245 |
$("#giturl-toggle").hide(); |
2261 |
$("#giturl-toggle").hide(); |
| 2246 |
src="/static/vendor/highlight.js/highlight.pack.js?version=5.5"></script> |
2262 |
src="/static/vendor/highlight.js/highlight.pack.js?version=5.5"></script> |
| 2247 |
src="/static/vendor/highlight.js/spec.js?version=5.5"></script> |
2263 |
src="/static/vendor/highlight.js/spec.js?version=5.5"></script> |
| 2248 |
$(document).ready(function() { |
2264 |
$(document).ready(function() { |
| 2249 |
$('pre.syntaxhighlightblock code').each(function(i, block) { |
2265 |
$('pre.syntaxhighlightblock code').each(function(i, block) { |
| 2250 |
hljs.highlightBlock(block); |
2266 |
hljs.highlightBlock(block); |
| 2251 |
hljs.lineNumbersBlock(block); |
2267 |
hljs.lineNumbersBlock(block); |
| 2252 |
}) |
2268 |
}) |
| 2253 |
function updateHighlight() { |
2269 |
function updateHighlight() { |
| 2254 |
var cls = "highlighted-line"; |
2270 |
var cls = "highlighted-line"; |
| 2255 |
$('.' + cls).removeClass(cls) |
2271 |
$('.' + cls).removeClass(cls) |
| 2256 |
if (location.hash !== '') { |
2272 |
if (location.hash !== '') { |
| 2257 |
var lines = location.hash.substr(2).split('-').map(function (x) { return parseInt(x, 10) }); |
2273 |
var lines = location.hash.substr(2).split('-').map(function (x) { return parseInt(x, 10) }); |
| 2258 |
for (var i = lines[lines.length - 1]; i >= lines[0]; i--) { |
2274 |
for (var i = lines[lines.length - 1]; i >= lines[0]; i--) { |
| 2259 |
$('[data-line-number=' + i + ']').closest('tr').addClass(cls); |
2275 |
$('[data-line-number=' + i + ']').closest('tr').addClass(cls); |
| 2260 |
} |
2276 |
} |
| 2261 |
return lines; |
2277 |
return lines; |
| 2262 |
} |
2278 |
} |
| 2263 |
return []; |
2279 |
return []; |
| 2264 |
} |
2280 |
} |
| 2265 |
$(window).on('hashchange', updateHighlight); |
2281 |
$(window).on('hashchange', updateHighlight); |
| 2266 |
var selected = []; |
2282 |
var selected = []; |
| 2267 |
$("[data-line-number]").click(function (ev) { |
2283 |
$("[data-line-number]").click(function (ev) { |
| 2268 |
var line = $(this).attr('data-line-number'); |
2284 |
var line = $(this).attr('data-line-number'); |
| 2269 |
if (ev.shiftKey) { |
2285 |
if (ev.shiftKey) { |
| 2270 |
selected = selected.slice(-1).concat(line); |
2286 |
selected = selected.slice(-1).concat(line); |
| 2271 |
} else { |
2287 |
} else { |
| 2272 |
selected = [line]; |
2288 |
selected = [line]; |
| 2273 |
} |
2289 |
} |
| 2274 |
var hash = '_' + selected[0]; |
2290 |
var hash = '_' + selected[0]; |
| 2275 |
if (selected.length === 2) { |
2291 |
if (selected.length === 2) { |
| 2276 |
hash = '_' + Math.min(selected[0], selected[1]) + '-' + Math.max(selected[0], selected[1]); |
2292 |
hash = '_' + Math.min(selected[0], selected[1]) + '-' + Math.max(selected[0], selected[1]); |
| 2277 |
} |
2293 |
} |
| 2278 |
window.location.hash = hash; |
2294 |
window.location.hash = hash; |
| 2279 |
return false; |
2295 |
return false; |
| 2280 |
}); |
2296 |
}); |
| 2281 |
</script> |
2297 |
</script> |