contrast-agent 4.14.0 → 4.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/contrast/agent/version.rb +1 -1
- data/lib/contrast/extension/thread.rb +31 -12
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ab9eae65aeefbeb3c12102f71287c60856783238067a7c461fcf534aaa65712
|
4
|
+
data.tar.gz: 1fe74d85374374f40a11c47e44ab0da1042a3f99d607fdfd697a45cc321b45b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df020b9d0ff09e61107e280f6e76411f9a9b75c1c94f7082ef52d487e5f88b940e75996dd869d648ac0af654f5f84e48b1f691fdcc9e5f294a565d2bb1a39b7d
|
7
|
+
data.tar.gz: 8bd869bfacbb82aea7b0cf55ff806fded4bae5c6b0454185c4c422bdd14ee07fd1edb3f4b843e702765a4693b51697a0497129d73d3d3652f32cc50056ed783b
|
@@ -10,22 +10,41 @@
|
|
10
10
|
# exists mostly for reference.
|
11
11
|
#
|
12
12
|
# Scope HAS to exist per-fiber.
|
13
|
+
# Check to see if Thread#initialize has been prepended. If it hasn't, then we should use the alias approach, so that
|
14
|
+
# others can continue to alias it. If it has been, then we must use prepend ourselves.
|
15
|
+
if Thread.instance_method(:initialize).owner == Thread
|
16
|
+
# Alias-chaining Thread#initialize.
|
17
|
+
class Thread
|
18
|
+
alias_method :cs__initialize, :initialize
|
13
19
|
|
14
|
-
|
15
|
-
|
16
|
-
|
20
|
+
def initialize *args, &block
|
21
|
+
# Thread.current still references the original(callee) thread that is instantiating this new fiber during
|
22
|
+
# initialization.
|
23
|
+
Contrast::Components::Scope::MONITOR.synchronize do
|
24
|
+
if (current_context = Thread.current[:current_context])
|
25
|
+
self[:current_context] = current_context.dup
|
26
|
+
end
|
17
27
|
|
18
|
-
|
19
|
-
# Thread.current still references the original(callee) thread that is
|
20
|
-
# instantiating this new fiber during initialization
|
21
|
-
Contrast::Components::Scope::MONITOR.synchronize do
|
22
|
-
if (current_context = Thread.current[:current_context])
|
23
|
-
self[:current_context] = current_context.dup
|
28
|
+
Contrast::Components::Scope.sweep_dead_ecs
|
24
29
|
end
|
25
30
|
|
26
|
-
|
31
|
+
cs__initialize(*args, &block)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
else
|
35
|
+
# Prepending Thread#initialize.
|
36
|
+
module ContrastThread
|
37
|
+
def initialize *args, &block
|
38
|
+
# Thread.current still references the original(callee) thread that is instantiating this new fiber during
|
39
|
+
# initialization.
|
40
|
+
Contrast::Components::Scope::MONITOR.synchronize do
|
41
|
+
if (current_context = Thread.current[:current_context])
|
42
|
+
self[:current_context] = current_context.dup
|
43
|
+
end
|
44
|
+
Contrast::Components::Scope.sweep_dead_ecs
|
45
|
+
end
|
46
|
+
super
|
27
47
|
end
|
28
|
-
|
29
|
-
cs__initialize(*args, &block)
|
30
48
|
end
|
49
|
+
Thread.prepend(ContrastThread)
|
31
50
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contrast-agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.14.
|
4
|
+
version: 4.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- galen.palmer@contrastsecurity.com
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: exe
|
15
15
|
cert_chain: []
|
16
|
-
date: 2021-12-
|
16
|
+
date: 2021-12-17 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: bundler
|
@@ -617,20 +617,20 @@ executables:
|
|
617
617
|
- contrast_service
|
618
618
|
extensions:
|
619
619
|
- ext/cs__common/extconf.rb
|
620
|
-
- ext/
|
621
|
-
- ext/cs__assess_string/extconf.rb
|
622
|
-
- ext/cs__assess_hash/extconf.rb
|
623
|
-
- ext/cs__assess_module/extconf.rb
|
624
|
-
- ext/cs__assess_kernel/extconf.rb
|
620
|
+
- ext/cs__assess_fiber_track/extconf.rb
|
625
621
|
- ext/cs__assess_array/extconf.rb
|
622
|
+
- ext/cs__assess_string/extconf.rb
|
623
|
+
- ext/cs__assess_regexp/extconf.rb
|
624
|
+
- ext/cs__assess_yield_track/extconf.rb
|
625
|
+
- ext/cs__assess_active_record_named/extconf.rb
|
626
626
|
- ext/cs__contrast_patch/extconf.rb
|
627
|
+
- ext/cs__assess_kernel/extconf.rb
|
628
|
+
- ext/cs__assess_hash/extconf.rb
|
629
|
+
- ext/cs__assess_string_interpolation26/extconf.rb
|
627
630
|
- ext/cs__os_information/extconf.rb
|
628
631
|
- ext/cs__assess_marshal_module/extconf.rb
|
629
|
-
- ext/
|
630
|
-
- ext/
|
631
|
-
- ext/cs__assess_active_record_named/extconf.rb
|
632
|
-
- ext/cs__assess_regexp/extconf.rb
|
633
|
-
- ext/cs__assess_yield_track/extconf.rb
|
632
|
+
- ext/cs__assess_basic_object/extconf.rb
|
633
|
+
- ext/cs__assess_module/extconf.rb
|
634
634
|
extra_rdoc_files: []
|
635
635
|
files:
|
636
636
|
- ".clang-format"
|